Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use ppk key when cloning a git repo

Tags:

git

I need to clone repo from git, but I do not know how to use ppk key when I do this. Git asks a password in console, but I have a key. I moved from windows and used there tortoiseGit, where it can be possible to just provide a path to the key.

So, how can I insert this key while cloning a repo throught console?

like image 296
iwazovsky Avatar asked Aug 26 '15 16:08

iwazovsky


1 Answers

The path to the key can be added in your ssh config, usually located at ~/.ssh/config.

host myrepo.com
HostName myrepo.com
IdentityFile ~/.ssh/id_rsa_github
User git

More details here.

You might also have to convert your ppk key to OpenSSH format using puttygen in putty-tools package. This can be done with the following commands for private/public key:

puttygen mykey.ppk -O private-openssh -o id_dsa
puttygen mykey.ppk -O public-openssh -o id_dsa.pub

More info about this here.

like image 92
Martin Avatar answered Oct 11 '22 12:10

Martin