When do git clone, it always show
[email protected]'s password
When use SSH protocol, it is not suppose to show this message, only enter private key passphrase for the key file if private key got this, but not sure why it show this message, all is working fine previously.
Here is my solution for this:
1: add config file under path:
C:\Users\SkyR\.ssh
Content is like below:
#########config file start#######
Host github.com
#User [email protected]
Hostname ssh.github.com
#PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
#Port 443
#########config file end#######
2: Convert Putty key format to OpenSSH key format(previous i use Pageant to load ppk to served for git command) with Putty Key Generator tool(after install putty, this tools will be installed as well)
After load private key(eg: privatekey.ppk)
Conversions -- Export OpenSSH key -- save it named "id_rsa"(i think file name can be updated from config file under same path)
openssh key file content start with like:
-----BEGIN OPENSSH PRIVATE KEY-----
.......................................................
-----END OPENSSH PRIVATE KEY-----
3: if use Tortorise git, then change the SSH client tool from
C:\Program Files\TortoiseGit\bin\TortoiseGitPlink.exe to C:\Program Files\Git\usr\bin\ssh.exe
4: do git pull or clone again, it works again....
标签:10,Git,key,working,git,-----,ssh,file,SSH From: https://www.cnblogs.com/renren0113/p/16722760.html