TortoiseGit is OK but GitExtensions fails

Posted 金庆

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了TortoiseGit is OK but GitExtensions fails相关的知识,希望对你有一定的参考价值。

TortoiseGit is OK but GitExtensions fails

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:

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-----

以上是关于TortoiseGit is OK but GitExtensions fails的主要内容,如果未能解决你的问题,请参考以下文章

TortoiseGit is OK but GitExtensions fails

TortoiseGit配合msysGit在Git@OSC代码托管的傻瓜教程

ERROR: Repository not found. ////Git, but is not registered in the Settings.

TortoiseGit使用指南

Ubuntu无法加载NTFS硬盘,Gparted显示硬盘The primary GPT table is corrupt, but the backup appears OK, so that wil

Ubuntu无法加载NTFS硬盘,Gparted显示硬盘The primary GPT table is corrupt, but the backup appears OK, so that wil