Setting Up Access
We have to create the repositories and set up access for you before you can get started.
Accessing by SSH
In order to access your repository by SSH, you need to first create an SSH key (or already have one you generated before). Github has instructions for doing this in Windows/Mac/Linux (steps 1–3 are relevant to us). You need to share the id_rsa.pub
file generated by this process.
Email zju.webdev@gmail.com with the subject “repository setup” and this info:
- Your student number (学号). We will use that as your username and personal repository name.
- The
id_rsa.pub
file for your key.
We will reply when we have set up your account and repository on the server. Once we have, you can clone your repository with this command:
git clone git@zju-webdev.cmpt.sfu.ca:student-number
If you are asked the password for the git@zju-webdev.cmpt.sfu.ca
, there was a problem with your SSH key. There is no password for that account: you must get your SSH key working.
Accessing by HTTPS
If you can access the repository by SSH (as described above), please do so. It is more secure, and just better all-around.
Email zju.webdev@gmail.com with the subject “repository setup” and this info:
- Your student number (学号). We will use that as your username and personal repository name.
- The password you want to use for the server.
We will reply when we have set up your account and repository on the server. Once we have, you can clone your repository with this command:
git clone https://student-number@zju-webdev.cmpt.sfu.ca/git/student-number
The SSL key on the server is self-signed so you will probably have to disable SSL verification by Git (alternate methods #1, alternate methods #2).
Accessing by both HTTP and SSH
You are certainly welcome to access your repositories by both HTTPS and SSH. Just send the info requested in both sections above in one email.
It's the same repository either way: you can access different ways on different computers if you want.
Setting Up Git
Make sure you have set your name and email address in your Git client. In Linux, that means commands like this:
git config --global user.name "Your Name"
git config --global user.email "your_email@example.com"
Git Clients
- In Linux, just install your distribution's git package.
- Git for Windows. This seems to be the best way: it's command line but all of the Git documentation is written for those tools.
- Mac Git. [I haven't tested.]
- Git Clients
Notes
With the first git push
, I had to do this:
git push origin master
After that, a regular git push
did the job.
Group Repositories
Repositories have been created for each group as well. Each group was given a name “Group A” to “Group L”. Your group repository can be checked out at one of these URLs (depending whether you're using SSH or HTTPS):
git@zju-webdev.cmpt.sfu.ca:group-X https://student-number@zju-webdev.cmpt.sfu.ca/git/group-X
Before doing any work in the group, please make sure you have set a good name and email address for your contributions:
git config --global user.name "Your Name" git config --global user.email your.email@example.com