TWiki> CS385 Web>AddStudentRepo (2017-01-13, Main.jakob)EditAttach

Adding your repo

The following steps will allow you to access your personal git repository. This will help us organize the submissions a little better as the final submission process will just require you to “git commit” and then “git push” your changes, instead of generating patches and emailing them.

Step 1: Add your private key to ssh

You can start once you receive an email from me with your private RSA key attached. Normally, a private key is just that; private. But we’re going to subvert this basic security principle in order to avoid the headache of having everybody generate a private and public key and then email their public key to me. In this case, I’ve generated the keys myself and now I’m sending you the private one.

Anyway, we want to install that key so that ssh (and git) will use it. To do that, start by moving the file to your .ssh directory in your home directory.

 mv <path to key> ~/.ssh 

Alternatively, you can create the file using a text editor and copy/paste the contents of the attached file into it. But the result is that there is a file named cs385key in your .ssh directory.

ssh may complain if just anyone can read this file, so lets make the permissions restricted to just us.

chmod 400 ~/.ssh/cs385key

Now that the file is there, we need some way of telling ssh to use that key instead of some other key that could be installed there. We do that by editing the file ~/.ssh/config. Its ok if this file doesn’t already exist.

nano ~/.ssh/config

And now we’ll add a new configuration.

host cs385
    user cs385gitolite
    port 22
    identityfile ~/.ssh/cs385key

Step 2: Adding your turn-in repo

Now you should be able to add your turn-in repository using your credentials. Replace <netid> with your real netid smile

git remote add turn-in cs385:cs385s17/<netid>

Topic revision: r7 - 2017-01-13 - 14:41:27 - Main.jakob
Copyright 2016 The Board of Trustees
of the University of
Helping Women Faculty Advance
Funded by NSF