我正在尝试连接到我在 gitlab.com 上的存储库。
它曾经在我在家和工作时在我的笔记本电脑上工作。我正在使用 ssh 并将 ssh 密钥添加到 gitlab。
几天前突然停止在家工作:我得到:
$ git pull
Connection closed by 54.93.71.23
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)
在我的工作网络中,在同一台笔记本电脑上使用 ssh 可以正常工作。
所以现在我切换到 https 并且它大部分时间都可以工作,但偶尔它会挂起,我得到:
fatal: The remote end hung up unexpectedly
error: RPC failed; result=56, HTTP code = 0
Run Code Online (Sandbox Code Playgroud)
从我的工作来看,这从未发生过,即使我尝试在半小时后提交相同的更改。
ssh 可能有什么问题?我是在路由器防火墙后面还是我的供应商改变了什么?
编辑 1: git pull 的输出,将 LogLevel DEBUG3 添加到我的 .ssh/config:
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_setup: setup umac-64-etm@openssh.com
debug1: kex: server->client aes128-ctr umac-64-etm@openssh.com none
debug2: mac_setup: setup umac-64-etm@openssh.com
debug1: kex: client->server aes128-ctr umac-64-etm@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
Connection closed by 54.93.71.23
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)
编辑 2: https 上的连接偶尔挂起,但经过多次测试,我这边没有 MTU 问题。可能提供者有一些失败。Github 和 Bitbucket 在 ssh 上工作得非常好。
谢谢!
小智 5
将您的 /etc/ssh/ssh_config 编辑为:
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1987 次 |
最近记录: |