windows - git (ssh_exchange_identification) 连接由对等方重置(windows、gitlab)

标签 windows ssh gitlab putty

我正在尝试在 Windows (PuTTY) 上使用 ssh 连接到 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 相关的类似帖子,但其中大部分涉及服务器端问题和安装障碍。建议的选项都没有任何效果,包括重新生成 key 。我尝试连接的 Gitlab 版本是 GitLab 7.7.2 bd98290。

我使用 putty-gen 转换了私有(private) ssh key ,以便可以加载它(我尝试了 3 种可能的类型)。我可以在 bitbucket 和其他 git 服务器上使用 ssh,所以我很困惑为什么我每次都被甩掉。我可以在客户端验证/调试连接吗?

Windows

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

我已经关闭了 windows 防火墙以查看是否对通信有任何影响,但到目前为止还没有成功。

可重复性

在同一子网中,其他人可以使用他们的 SSH key 连接到存储库。我也可以使用 http 版本,但它每次都会在 88% 左右中断克隆过程,可能是因为 repo(太大)了。我想使用 reflog 缩小它的大小,但我必须先在本地克隆它,对吗?

提前致谢。

最佳答案

这是最终解决我的问题的解决方案。

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

2) 我使用 git-ext 修剪了所有大文件。对于这种事情,这确实是一个很棒的工具。唯一的缺点是它会一直列出大文件,即使它们的删除已被推送(强制)到所有分支上也是如此。

3) 由于某种原因,http 和 ssh 现在设法正确连接,即使在同一子网内也是如此。

也许一些网络gitlab专家知道这可能是什么原因造成的?我撞到了某种阈值?网络故障? Gitlab 失误?电线上的外星人?

关于windows - git (ssh_exchange_identification) 连接由对等方重置(windows、gitlab),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29795162/

相关文章:

windows - 使用大括号或循环时 sed 出现额外字符错误

SSH - 从 Mac OSX 到 CentOS 服务器的权限被拒绝(公钥)问题

Perl fork exec,父系统中的系统并杀死子系统

gitlab - GitLab 顶部栏上的 "Next"标志表示什么?

即使代码上传到托管平台检索到错误,Gitlab 作业也会成功

windows - 如何编写看门狗定时器以重新启动 Windows 服务?

windows - 从命令行对不同长度的十六进制数进行排序?

git - 在没有 VCS 客户端的情况下在本地文件系统上使用远程版本控制 (VCS) 命令

python - 如何使用python将问题发布到gitlab?

windows - 如何将文件从一个文件夹复制到另一个文件夹(需要文件夹合并和文件覆盖存在)