A Wealth of Knowledge

Previous
Next

Tortoise Git or SmartGit & Media Temple DV 4.0

These instructions rely on having git, tortoise git with bash and putty generator installed.

Log into your server with root account using SSH (putty)

REMOTE: Make a directory to store all your ssh keys (only needs to be done once)

cd /root
mkdir .ssh

LOCAL: Generate a key for your local computer, start -> run -> bash

ssh-keygen -t rsa -b 2048 -f ~/.ssh/id_rsa -C “Enter an optional comment about your key”
enter a strong passphrase (password, empty for no pass but not recomended)

LOCAL: Upload your public key to the server

cat ~/.ssh/id_rsa.pub | ssh root@example.com ‘cat – >> ~/.ssh/authorized_keys’

REMOTE: Set Permissions for the newly created directory and auth keys file

chmod 600 ~/.ssh/authorized_keys && chmod 700 ~/.ssh/

LOCAL:

  • Convert existing private key to putty format. start -> run -> puttygen
  • Load an existing Private Key -> Press “Load”
  • Browse to your C:/Users/(name)/.ssh folder and find the recently created file (id_rsa not the .pub file)
  • Enter passphrase
  • Click Save Private Key
  • Make sure name includes .ppk at the end of it

From here you need to either start a new Clone or open an existing remote path in tortoise git settings.

  • Right Click folder select Git Clone
  • Url: ssh://root@websitename.com/var/www/vhosts/gitblankrepodirectory/reponametoclone
  • In the Load Putty Key Section click “…” choose the newly created .ppk file

 

 

If You are a developer and need to create your ssh key to send to have it implemented follow these directions:

These instructions rely on having git, tortoise git with bash and putty generator installed.

LOCAL: Generate a key for your local computer, start -> run -> bash

ssh-keygen -t rsa -b 2048 -f ~/.ssh/id_rsa -C “Enter an optional comment about your key”
enter a strong passphrase (password, empty for no pass but not recomended)

LOCAL:

  • Convert existing private key to putty format. start -> run -> puttygen
  • Load an existing Private Key -> Press “Load”
  • Browse to your C:/Users/(name)/.ssh folder and find the recently created file (id_rsa not the .pub file)
  • Enter passphrase
  • Click Save Private Key
  • Make sure name includes .ppk at the end of it

From here you need to either start a new Clone or open an existing remote path in tortoise git settings.

  • Right Click folder select Git Clone
  • Url: ssh://root@websitename.com/var/www/vhosts/gitblankrepodirectory/reponametoclone
  • In the Load Putty Key Section click “…” choose the newly created .ppk file


 

 

Resources:
http://kb.mediatemple.net/questions/1626/Using+SSH+keys+on+your+server
http://andremolnar.com/how_to_set_up_ssh_keys_with_putty_and_not_get_server_refused_our_key
http://www.syntevo.com/smartgit/index.html