Configure your SSH for GIT

You may ease up the use of SSHing to your git repo by configuring your SSH.  To do so, simply follow this quick HowTo:

1. Create a file using your prefered text editor (i.e. nano or vim) and paste the following in it:

For this HowTo and for simplicity sake, we'll use the following values:
GIT server: github.com (replace this host with your GIT repo server - if it's not GitHub)
Key name: exemple.key
Username: git (it is always "git" when using GitHub and Stash)

So, the following block to paste is the following in the ~/.ssh/config file* (make sure to adjust the values accordingly to your setup):

Host github.com
Hostname github.com
User git
IdentityFile ~/.ssh/exemple.key


* If the file doesn't exist, you may create it.

After adding the configuration you'll now be able to interact with your repo (i.e. git checkout to checkout your repo & git pull for pulling the code)
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How to create a SSH key set

If your SSH server is visible over the Internet, you should use public key authentication instead...

How to authorize your SSH key on cPanel

Login to cPanel and search for SSH : or scroll down and find the 'SSH Access' option:...

Force your SSH client to use password authentification

From time to time, you may need to force SSH client to use password authentication instead of...

Configure your SSH client on Apple

You may ease up the use of SSHing to your server by configuring your SSH client.  To do so,...