首页 文章

git(ssh_exchange_identification)连接由peer重置(windows,gitlab)

提问于
浏览
4

我正在尝试使用Windows上的ssh(PuTTY)连接到gitlab服务器(我没有权限) . 我尝试过的git客户端包括简单的git,git-extensions,sourcetree和git bash / gui . 所有这些基本上都告诉我:

Cloning into 'repo'...
debug2: ssh_connect: needpriv 0
debug1: Connecting to git.server [x.y.z.w] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/c/Users/user/.ssh/id_rsa" as a RSA1 public key
debug1: identity file /c/Users/user/.ssh/id_rsa type 1
debug1: identity file /c/Users/user/.ssh/id_rsa-cert type -1
debug1: identity file /c/Users/user/.ssh/id_dsa type -1
debug1: identity file /c/Users/user/.ssh/id_dsa-cert type -1
debug1: identity file /c/Users/user/.ssh/id_ecdsa type -1
debug1: identity file /c/Users/user/.ssh/id_ecdsa-cert type -1
debug1: identity file /c/Users/user/.ssh/id_ed25519 type -1
debug1: identity file /c/Users/user/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1
ssh_exchange_identification: read: Connection reset by peer
fatal: Could not read from remote repository.

我已经更改了repo / server / ip / user的名称,但这是我每次尝试连接时都会得到的 . debug3消息真的不应该引起任何兴趣(?)我在这里以及与ssh和GitLab相关的其他方面看过类似的帖子,但大多数都涉及服务器端问题和安装障碍 . 所有建议的选项都没有任何影响,包括重新生成密钥 . 我试图连接的Gitlab版本是GitLab 7.7.2 bd98290 .

我使用putty-gen转换私有ssh密钥以便它可以加载(我尝试了3种可能的类型) . 我可以在bitbucket和其他git服务器上使用ssh,所以我很困惑为什么每次都被抛弃 . 我可以做一些客户端事情来验证/调试连接吗?

Windows

我确实有一个cygwin安装,但有一段时间没有使用它 . 它还链接回ssh的标准windows配置文件(当我第一次看到它们时它们是空的,我已经尝试了一些关于cyphers和LDAP以及各种git内存包/解包设置的补充,但这些都没有真正帮助)

我已关闭Windows防火墙,看看它是否对通信有任何影响,但到目前为止还没有运气 .

Reproducibility

其他人可以使用他们的SSH密钥连接到存储库,位于同一子网中 . 我也可以使用http版本,但它每次都会以大约88%的速度打破克隆过程,可能是因为repo(太大)了 . 我想用reflog缩小它的尺寸,但我必须先在本地克隆它,对吗?

提前致谢 .

1 回答

  • 1

    这是解决方案,最终解决了我的问题 .

    1)我注意到我无法使用同一子网内的http进行连接,但我设法使用来自另一个子网的http进行连接 .

    2)我使用git-ext修剪了所有大文件 . 这对于这种事情来说真的是一个很棒的工具 . 唯一的缺点是它会继续列出大文件,即使它们的删除已被推送(强制)在所有分支上 .

    3)由于某种原因,http AND ssh现在可以正确连接,即使在同一子网内也是如此 .

    也许某些网络gitlab专家知道可能导致这种情况的原因是什么?我碰到了某种程度的门槛?网络故障? Gitlab滑了吗?电线上的外星人?

相关问题