Setting up Git (Linux) with your Beanstalk or GitHub account

This is a simple topic taking you through how to set up git with your Beanstalk or GitHub account

1./ Setting up GIT
1.1/ Download the latest git-core package using aptitude or synaptic

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install git-core git-gui git-doc

2./ Setting up SSH key
2.1/ change directory to ~/.ssh

$ cd ~/.ssh

2.2/ create SSH key. Keeping things simple, just enter an empty passphrase

$ ssh-keygen -t rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/your_user_directory/.ssh/id_rsa.
Your public key has been saved in /Users/your_user_directory/.ssh/
The key fingerprint is:
The key's randomart image is:
+--[ RSA 2048]----+
| .+ + |
| = o O . |
| = * * |
| o = + |
| o S . |
| o o = |
| o . E |
| |
| |

2.3/ Add your SSH key to Beanstalk or GitHub

Copy content and …

On the Beanstalk site go to “Profile & Settings” > Click “Keys” > Click “Add public key”

beanstalk public key

On the GitHub site go to “Account Settings” > Click “SSH Public Keys” > Click “Add another public key”

github public key

(Putty) Pageant autoload private key

If you are remotely connecting to your linux desktop using putty and you want to avoid typing your password then pageant is your answer however pageant has a memory of a gold fish. It cannot remember your private key once you have exited from the application. So to get pageant to remember, here is a little trick.

Lets say your private keys are located at “C:\putty\cert”, create a batch file autoloader.cmd and add the following lines

— start here —

if exist "C:\putty\cert\your-linux1.ppk" (set KEYS="C:\putty\cert\your-linux1.ppk")

if exist "C:\putty\cert\your-linux2.ppk" (set KEYS=%KEYS% "C:\putty\cert\your-linux2.ppk")

if not defined KEYS exit
start /d"c:\putty" pageant.exe %KEYS%

— end here —