简体   繁体   中英

Use ppk key when cloning a git repo

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?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM