...
- Log into one of the instructional servers (amdpool, linuxpool-01, ph314-#)
- Type "ssh-keygen -t rsa -f $HOME/.ssh/ece-git". Note, do NOT share the private key that is created, it will allow anyone to use your account!
- Create a file $HOME/.ssh/config. The contents should be:
Omit the "<" and ">" around your netidNo Format Host augean.ece.cornell.edu IdentityFile ~/.ssh/ece-git User git host * IdentityFile ~/.ssh/id_rsa User <yournetid>
- Set the permissions on your .ssh folder and subfiles, this is VERY IMPORTANT or you will compromise the security of your own account.
No Format cd $HOME chmod 700 .ssh cd .ssh chmod 600 * cd $HOME
- Wait 5-10 minutes
- Create your project and push it to the GIT server, for example:
No Format mkdir myprojects cd myprojects git clone git@augean.ece.cornell.edu:projects/<netid>/project1 cd project1
- Copy/move the files you want to share to that folder and then sitting in that folder:
No Format git add * git commit -m "Initial Commit" git push origin master
- Set permisisons on the project
No Format ssh git@augean.ece.cornell.edu perms -h
- The output will tell you how to add users to allow them to read or write to your project. Users have to have a valid ECE account to access.
Do NOT share your private keys, you could lose data as well as your account privileges. It is your responsibility for the security of your account.
Example:
No Format |
---|
ssh-keygen -t rsa -f $HOME/.ssh/ece-gitecho "Host augean.ece.cornell.edu" > $HOME/.ssh/config
echo " IdentityFile ~/.ssh/ece-git" >> $HOME/.ssh/config
echo " User git" >> $HOME/.ssh/config
echo "Host *" >> $HOME/.ssh/config
echo " IdentityFile ~/.ssh/id_rsa" >> $HOME/.ssh/config
echo " User zzz123" >> $HOME/.ssh/config
cd $HOME
chmod 700 .ssh
cd .ssh
chmod 600 *
cd $HOME
sleep 300
mkdir myprojects
cd myprojects
git clone git@augena.ece.cornell.edu:projects/zzz123/halo
cd halo
...create a bunch of files...
git add *
git commit -m "Initial Commit"
git push origin master
ssh git@augean.ece.cornell.edu perms -l projects/zzz123/halo
ssh git@augean.ece.cornell.edu perms projects/zzz123/halo + READERS yyy123
ssh git@aguean.ece.cornell.edu perms projects/zzz123/halo + WRITERS xxx123
|