27

I have the public key. I think this is needed for the SSH connection to the server where the git repo is located.

Now I don't know how to get the code. Can someone please tell me the complete procedure that I have to do so I get the code?

  1. Installing git + related configuration
  2. Establish SSH connection
  3. Get the repo
  • When you establish a SSH connection, it is going to be independent for every server. You should mention what sort of server are you using. For instance, GitHub, BitBucket or a private one. – Lucio Sep 23 '14 at 16:46
  • @Lucio it is a private one, what do I have to do with the SSH then? – Kristof Tak Sep 23 '14 at 16:54
  • The procedure in your side (generate the key) is the same. The procedure of deploying your key on the server is what will be different. For that, you will need to ask for help to the server admin. – Lucio Sep 23 '14 at 18:49
22

Setup Git

  1. Install it with sudo apt-get install git (see here)
  2. Configure Git (see here)

Implement SSH on GitHub/BitBucket

  1. Generate the SSH key with ssh-keygen -t rsa -b 4096 (see here)
  2. Copy the content of your public SSH key, it is the file id_rsa.pub by default
  3. Paste the content into your GitHub/BitBucket account on the SSH key section

Get the repo

Just clone it:

  • GitHub: git clone git@github.com:YOUR_USERNAME/REPO_NAME.git
  • BitBucket: git clone git@bitbucket.org:USERNAME/REPO_NAME.git

For more information managing a repo, take a look at the Git For Humans guide by Lucio Martinez.

GUI Tools

You can install git-gui which is a built-in GUI tool for commit.

For more options, take a look at the list on the official page.

  • thanks Lucio; in your guide you have the assumption that I use GitHub or BitBucket, instead the repo is located at git@git.<somewebsite.net>:<reponame> does this change anything? – Kristof Tak Sep 23 '14 at 16:52
  • 1
    Not really, just make sure to mention correctly your server. – Lucio Sep 23 '14 at 18:47

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.