Git and Github on the FASRC cluster
We strongly encourage all persons writing code (C, C++, Fortran, R, etc) to make use of the version control system git. The git suite of tools is available on the cluster without having to do a
module load, and is available on all login and compute nodes.
Using Github, however, may be a little less straightforward. If you cloning Github repos using the
https:// protocol, you will experience authorization issues that you may not have experienced on your desktop or laptop. For this reason, we strongly encourage you to use the SSH protocol instead, in conjunction with a personal, cluster public SSH key that needs to be included in your Github account preferences.
Please follow the instructions at https://help.github.com/articles/generating-ssh-keys/ to generate your key on the FASRC cluster. Briefly
- Log into the cluster.
- Generate your SSH key according to Github’s directions. There is no need to follow step 3 (Add your key to the ssh-agent).
If you now clone a Github repo on the cluster with the SSH protocol, you should be good to go.
For Existing Repositories: If you’ve already cloned a Github repo using
https://, you can switch to SSH with these simple directions:
- In the terminal and on the cluster, ensure you are inside the top level or one of the directories of your repository.
- On Github, navigate to the repository you had cloned, switch to the SSH protocol, and copy the link. The protocol should look something like
- Issue the command
git remote set-url origin URL, where URL is the link you copied in the previous step (e.g.
- Use the command
git remote -vto see if there are other remote repository URLs that you need to set.
You should now be able to issue the
git push command without error.