-
Notifications
You must be signed in to change notification settings - Fork 26
All: Downloading from GitHub
If you are unfamiliar with using GitHub, follow these instructions to download one of the repositories.
If you are new to Git, please take some time to go through one of the recommended tutorials
If you have not added your SSH key to GitHub, follow these instructions to do this now:
-
It is easiest to use Git via SSH, which means you need to copy your SSH public key to your GitHub account. First, run
ls ~/.ssh
and see if you have a file called~/.ssh/id_rsa.pub
. If you do not have this file, go to Step 2. Otherwise, continue to Step 3. -
Run
ssh-keygen
and accept all of the default options (just keep pressing enter), which will create
~/.ssh/id_rsa.pub
-
Run
cat ~/.ssh/id_rsa.pub
This will print out your public key to the terminal. It looks like
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCnZW+yK2lxkPtn2PJ8bEqCFHfEC /s3FcX9/7p8pdO6X/D7oqVLw5WiL0qZqRA+JQi50nVAn7k8veeN0TTpzncyzMtTfYpN BCjGME8meS+i2QiN59ENU2f+JJ2v53EKJ2Pkfuo2KtBD2DVq3FWq9iRnYRb/BZi4etYG ZMFSL9YYBkkh3pbAhuOVoKlX9fA01/gkHBG/Il9txnFuQBOyM1hZwnUj0EsEdHf51Otyc XgKVUDp+1ZfY2Iy86JgOxuL2B8/mszlgdmXdBQVLVPkHqVkCw+Y5mP1xtVPs0ggYrnuw6 e4TPSjLWAbkcDkN/Twc8cEUlQPKy0RtxDFehB7k1hX [email protected]
Copy this onto your clipboard
-
Open GitHub in your browser, and click on your portrait photo on the top right corner of the website. Select 'Settings' from the dropdown menu
-
On the left panel of your settings page, click on 'SSH keys'
-
In the main panel, click on the button 'Add SSH key' on the right side of the screen
-
Name your SSH key (whatever you like e.g.,
Work desktop
) and paste the public key into the main text box. Click the 'Add key' button to save your key
To clone a Git repository, do the following:
-
Go to the project page for the Git repository you want access to e.g. https://github.com/BrainDynamicsUSYD/neurofield
-
In the panel on the right side of the screen, there is a small textbox with a title HTTPS clone URL or SSH clone URL. Underneath the text box, it says 'You can clone with HTTPS, SSH, or Subversion'. Click on 'SSH', and then copy the URL in the textbox. The URL looks like
[email protected]:BrainDynamicsUSYD/neurofield.git
-
Open a terminal window, and navigate to the folder where you want to download the repository to e.g., your home directory.
-
Type
git clone
and then paste the URL into the terminal window. So the complete command to download the NeuroField repository isgit clone [email protected]:BrainDynamicsUSYD/neurofield.git
-
Git will now download the repository into a new folder called
neurofield
inside the current directory
© Brain Dynamics Group, University of Sydney 2015