diff --git a/FAQ.md b/FAQ.md index 15094e9..e06417e 100644 --- a/FAQ.md +++ b/FAQ.md @@ -10,38 +10,39 @@ connecting to a server, and connecting to a specific channel. ## How can I build ssh-chat? -First make sure you have a copy of the Go compiler (1.6+ should be fine). Next you need a workspace for -the Go compiler to do all of it's builds. Make a directory, something like `work` in your $HOME folder, -where we can place the source folder into. +You'll need a recent version of the Go compiler (1.7 is best, but 1.5+ should work). + +Next you'll need to setup your Go development environment. Check this article for details: [How to Write Go Code](https://golang.org/doc/code.html). + +Long story short, something like this: -The next step is setting up our GOPATH so Go knows where it can start building and downloading packages. -After that we can copy the source code into the GOPATH directory for compiling. ``` bash -mkdir ~/work -export GOPATH=~/work # add this to your .bashrc/.zshrc file to save you time -go get github.com/shazow/ssh-chat -cd $GOPATH/src/github.com/shazow/ssh-chat -make +$ mkdir $HOME/work +$ export GOPATH=$HOME/work # Add this to your ~/.bashrc or similar +$ go get github.com/shazow/ssh-chat +$ cd $GOPATH/src/github.com/shazow/ssh-chat +$ make ``` + That should make the workspace directory, export the GOPATH to your environment, clone the -repository into the workspace, change directory into the code, and start executing the Makefile instructions +repository into the workspace, change directory into the code, and run the Makefile instructions for you. If you have any trouble building, please open an issue on the tracker and let us know what problems you run into during the build process. + ## How can I contribute to ssh-chat? So once you've set up the build phase, you can start contributing right away! `ssh-chat` uses Go, so if you are familiar with C/C++ or Java, Go should be a snap. Check out the following sites for quick insight into the Go language. -* [A Tour of Go](https://tour.golang.org/welcome/1) +* [A Tour of Go](https://tour.golang.org/) * [Go By Example](https://gobyexample.com/) Next, before you start committing changes, you will want to create a different branch to work on, and -fork `ssh-chat` so you can create Pull Requests. First create a fork, then we will go over how to -create a branch. +fork `ssh-chat` so you can create Pull Requests. First [create a fork](https://github.com/shazow/ssh-chat#fork-destination-box), then we will go over how to create a branch. Once you've forked `ssh-chat`, go into your shell and create a new Git branch. Name it something based on what you're adding to the project. Try for simple names like `readme-fix` or `new-themes`, @@ -49,16 +50,19 @@ something short and easy that describes a feature or addition. Then, you check o you made. ``` bash -git branch my-branch # change my-branch to your desired branch name -git checkout my-branch +$ git checkout -b my-branch-name # Make a new branch and switch to it ``` + Now you can make your changes. Once you've finished that, you will then have to add these files to be staged for committing. Once added, we can create a commit message, and push it to your fork repository. ``` bash -git add file.txt # add more files if you've made changes in more places -git commit -m "Fixed not having a file.txt in the project" +$ git add newfile.txt # Add any new files +$ git commit -m "Fixed not having a file.txt in the project" ``` + +Try to keep commit messages [similar to the style the project already uses](https://github.com/shazow/ssh-chat/commits/master). + Now the changes are ready to be pushed. Currently, Git doesn't know where to push these changes, since we're on a different branch. We need to set a remote that we can push these changes to. @@ -66,23 +70,38 @@ we're on a different branch. We need to set a remote that we can push these chan git remote add myrepo https://github.com/my-username/ssh-chat git push -u myrepo ``` + That should push your changes to your repository instead of the `ssh-chat` repository. Now you can create a Pull Request which will compare your changes to the upstream's (original repository) Git, and if the changes are approved by the owner, then they will get merged! + ## What features are planned for ssh-chat? Check the [milestones page](https://github.com/shazow/ssh-chat/milestones) which should have a list of features planned. + ## How can I click on URLs posted in chat? Do you have clickable/yankable URL support in your terminal emulator? Depending on your terminal, you might be able to check the settings to see if it has URL support. +Usually it's ctrl+click or cmd+click. + + ## Can I block users from connecting? Yes. `ssh-chat` has a whitelisting feature which allows you to take users' public keys and add them to a whitelist, so that only they may connect when their public key matches the authorized keys given to `ssh-chat`. +You'll need to get your friends' ssh public keys ahead of time and make a file similar to what you'd do on `~/.ssh/authorized_keys` for your ssh server. + +For example, here is how you'd whitelist so that only @shazow can connect to your server: + +```bash +$ curl https://github.com/shazow.keys >> whitelist_keys +$ ssh-chat --whitelist=$PWD/whitelist_keys ... +``` +