0

当我尝试克隆 github 存储库时,我得到

Couldn't agree a key exchange algorithm (available: curve25519-sha256@libssh.org,ecdh-sh
a2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521) 

如果我git clone从私人存储库或我的 bitbucket 帐户尝试,它工作正常。

我在 windows7 64 上。我使用pageant作为 ssh 代理。我已经在 GIT_SSH 环境变量中尝试了 TortoisePlink.exe 和 plink.exe (这个https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html )。

在我格式化并重建我的电脑之前,我对这个配置和这个 ssh 密钥没有任何问题。

我已经尝试在我的 github 帐户中删除和重新添加密钥,并且我尝试使用 rsa 1024、rsa 4096 和 ed25519 密钥。

我正在运行 git windows bash。我也尝试过使用 phpstorm UI,结果相同。

如果我尝试使用 TortoisePlink.exe,就会发生这种情况(另外,我会收到一个带有上述错误的弹出窗口):

$ git clone git@github.com:foothing/laravel-gdpr-consent.git
Cloning into 'laravel-gdpr-consent'...
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

如果我尝试使用 plink.exe,就会发生这种情况:

$ git clone git@github.com:foothing/laravel-gdpr-consent.git
Cloning into 'laravel-gdpr-consent'...
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa xx:xx:xx
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n)

我点击 y 并没有任何反应(我相信 git 和 plink 之间的输入处理发生了一些奇怪的事情)

如果我尝试通过 ssh 连接到 github,我会得到以下信息

$ ssh git@github.com
key_load_public: invalid format
Warning: Permanently added the RSA host key for IP address 'x.x.x.x' to the list of known hosts.
Enter passphrase for key '/foo/bar/.ssh/id_rsa':
PTY allocation request failed on channel 0
Hi brazorf! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.

吉特版本:

$ git --version
git version 2.16.2.windows.1
4

1 回答 1

0

不知道为什么这个问题被否决了。

这就是我解决此问题的方法:

更多细节在这里https://github.com/desktop/desktop/issues/4105

于 2018-05-30T23:06:29.230 回答