GitExtensions and Git fail:
"git" pull --progress "origin" git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. Done Press Enter or Esc to exit...
But TortoiseGit is OK.
git.exe pull --progress -v --no-rebase "origin" From github.com:jinq0123/recastnavigation = [up to date] master -> origin/master = [up to date] release-2.0 -> origin/release-2.0 Already up to date.
ssh -T shows that the reason is there is no id files:
ssh -T
PS d:\github> ssh -vT git@github.com OpenSSH_for_Windows debug1: Connecting to github.com [20.205.243.166] port 22. debug1: Connection established. debug1: identity file C:\\Users\\jinqing/.ssh/id_rsa type -1 debug1: identity file C:\\Users\\jinqing/.ssh/id_xmss-cert type -1 debug1: Authenticating to github.com:22 as 'git' debug1: Host 'github.com' is known and matches the ED25519 host key. debug1: Found key in C:\\Users\\jinqing/.ssh/known_hosts:2 debug1: Will attempt key: C:\\Users\\jinqing/.ssh/id_rsa debug1: Will attempt key: C:\\Users\\jinqing/.ssh/id_xmss debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Trying private key: C:\\Users\\jinqing/.ssh/id_rsa debug1: Trying private key: C:\\Users\\jinqing/.ssh/id_xmss debug1: No more authentication methods to try. git@github.com: Permission denied (publickey). PS d:\github>
Copy my RSA key file rsa.ppk that TortoiseGit uses as ~/.ssh/id_rsa:
PS D:\jinqing\github_jinq\recastnavigation> ssh -T git@github.com Load key "C:\\Users\\jinqing/.ssh/id_rsa": invalid format git@github.com: Permission denied (publickey). PS D:\jinqing\github_jinq\recastnavigation>
Open TortoiseGit/bin/puttygen.exe, load rsa.ppk, then Convensionis->Export OpenSSH key as ~/.ssh/id_rsa:
PS D:\jinqing\github_jinq\recastnavigation> ssh -T git@github.com Hi jinq0123! You've successfully authenticated, ...
id_rsa begins with:
-----BEGIN RSA PRIVATE KEY-----
Powered by: C++博客 Copyright © 金慶