Open terminal and navigate to the directory you want to use.
cd desktop
Check that you have git installed.
git --version
If you do not have git installed you should be prompted to install it.
Attempt to clone git repo
git clone [email protected]:jeberhard/XXX-cs410-winona.git
You should be prompted to enter your SSH passphrase and to add bluemix to your trusted hosts.
If you get an error such as:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The verson of eclipse that RSA is built on top of changed your .ssh directory permissions and generated a key that is not secure enough for gitlab. First generate a new key.
ssh-keygen -t rsa
When prompted for save location hit enter for default .ssh directory Overwrite existing SSH key's stored in this location. Create a passphrase for your SSH key.
Then open file explorer and navigate to your root directory
~/.ssh
This is a hidden file so you may need to set you system to show hidden directories by typing
CMD + SHIFT + .
Inside this folder find the id_rsa.pub this is your public key. Open this file in text edit and copy your public key. Open your gitlab repo and replace your old SSH key with this one.
Now go back to terminal and change the permissions on these files to once again be passphase procted.
sudo chmod 600 ~/.ssh/id_rsa
sudo chmod 600 ~/.ssh/id_rsa.pub
Attempt to clone git repo again
git clone [email protected]:jeberhard/XXX-cs410-winona.git
Every time you pull or push from your local stystem to remote repo you will need to type your SSH passphrase. Instead of typing it everytime you can set up an SSH agent so you only need to type it once per terminal session.
ssh-add ~/.ssh/id_rsa
If you are truly lazy you can add this command to your bash profile.
Open the ~/.bashprofile
file
Create a new line with:
ssh-add ~/.ssh/id_rsa #Add SSH Identity on startup