Skip to content

Cloning github to local computer

Andrew Reckers edited this page Jun 12, 2023 · 3 revisions

We use a shared github repository for our scripts. You can clone that repo to your local computer to be able to access (pull) and edit (push) those scripts. You need to already have a github account and be a member of our organization. More information about this process can be found here: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

glasgowlab/projects

  1. In terminal, run: ssh-keygen -t ed25519 -C "[email protected]"
  2. Press enter three times (I think) until process appears complete
  3. In terminal, run: cat ~/.ssh/id_rsa.pub (may have to tab complete this to get it to find file)
  4. Copy the whole printed statement that starts with ssh
  5. Go to github in browser, click your avatar in top right and navigate to settings
  6. In sidebar, click SSH and GPG keys, then click the green New SSH key button
  7. Give it a title (such as glab_projects) and copy the whole statement from step 4 into the key box
  8. In terminal, run: eval "$(ssh-agent -s)"
  9. In https://github.com/glasgowlab/projects, click the green Code button, click ssh, and then copy the given ssh key
  10. In terminal, cd into the directory that you want the code to be in
  11. In terminal, run: git clone (paste ssh key here)
  12. In pycharm or other IDE, open the directory with the downloaded repository and it should begin downloading the repo to your computer
  13. Make a test commit by making a new file, as this first commit will require login to github
Clone this wiki locally