gpt4 book ai didi

git - 克隆 git 存储库的问题

转载 作者:IT王子 更新时间:2023-10-29 01:30:33 25 4
gpt4 key购买 nike

我正在尝试克隆 git 存储库,但出现错误

Unable to negotiate with <server>: no matching key exchange method found.
Their offer: diffie-hellman-group1-sha1
fatal: Could not read from remote repository.

我编辑了 ~/.ssh/config 并添加了

Host somehost.example.org
KexAlgorithms +diffie-hellman-group1-sha1"

但我仍然遇到同样的错误。

其他解决方案是使用命令 ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 user@127.0.0.1 -p 2222 但我也收到端口号 22 的连接被拒绝。

我正在使用 windows 机器。

最佳答案

touch ~/.ssh/config

为遇到相同问题的人附上我的 ssh 配置

## use kex algorithm ##
Host 10.172.4.66
KexAlgorithms diffie-hellman-group1-sha1

## Avoid Write failed : boken pipe issue ##
ServerAliveInterval 120
TCPKeepAlive no

如果遇到其他问题,请使用更大的 postBuffer

fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
$ git config --global http.postBuffer 10000000000000000000000000000000

$ git clone ssh://xxx xx
Cloning into 'xx'...
remote: Counting objects: 105491, done.
remote: Compressing objects: 100% (32876/32876), done.
Receiving objects: 100% (105491/105491), 1.74 GiB | 19.55 MiB/s, done.
remote: Total 105491 (delta 67211), reused 104583 (delta 66603)
Resolving deltas: 100% (67211/67211), done.
Checking connectivity... done.
Checking out files: 100% (16545/16545), done.

关于git - 克隆 git 存储库的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33910364/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com