Git克隆产生错误的数据包长度错误

标签 git ssh gitlab

我在 Windows 上通过 ssh 提取 git 存储库时遇到问题。存储库位于 GitLab 服务器上。我执行以下步骤:

  • 使用 ssh-keygen -t rsa -C "my@email.here" 创建公钥
  • 将 key 保存在 C:\Users\myUserName\.ssh\keyName
  • 运行 ssh-agent 的输出(即导出 SSH_AUTH_SOCK; ...)
  • 运行 ssh-add并在 C:\Users\myUserName\.ssh\keyName 中添加 key
  • 在 GitLab 中添加公钥。

  • 同样的设置在我的 Linux 和我同事的 Windows 机器上运行良好。
    当我尝试使用 git clone 克隆存储库时我收到以下错误:
    Disconnecting: Bad packet length 1397966893. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
    我试图谷歌它,但我发现没有合适的。有人知道我是否犯了错误或错误可能是服务器端的吗?

    编辑:我得到以下调试输出:
    C:\Users\Johannes\Documents\GitHub> ssh -vT -p 80 git@random.secret.sever.de
    OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
    debug1: Reading configuration data /c/Users/Johannes/.ssh/config
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Applying options for *
    debug1: Connecting to random.secret.sever.de [192.44.1.37] port 80.
    debug1: Connection established.
    debug1: identity file /c/Users/Johannes/.ssh/identity type -1
    debug1: identity file /c/Users/Johannes/.ssh/id_rsa type 1
    debug1: identity file /c/Users/Johannes/.ssh/id_dsa type -1
    debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9p1 Debian-5ubuntu1.1
    debug1: match: OpenSSH_5.9p1 Debian-5ubuntu1.1 pat OpenSSH*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_4.6
    debug1: SSH2_MSG_KEXINIT sent
    Disconnecting: Bad packet length 1397966893.
    

    编辑2:看起来我的问题是基于我的硬件和软件设置。只需并行执行相同的步骤,它就可以在另一台计算机上运行。

    最佳答案

    偶然发现了我的问题的原因。我尝试使用一个旧技巧并启动系统恢复来撤消我的 Git 安装。由于我的病毒扫描程序,它失败了。卸载 Bitdefender Antivirus 免费版后,它工作了。传入的 SSH2 消息被阻止(获得 Windows 8 Pro),导致 bad packet length错误。无论如何,感谢您的支持!

    关于Git克隆产生错误的数据包长度错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20722169/

    相关文章:

    git - git subtree merge 和 git-subtree 有什么区别

    git - 将 Heroku 应用程序导出到新的 GitHub 存储库

    linux - 监听端口putty隧道不工作

    python - PhantomJS webdriver 的创建导致 Python 中通过 ssh session 的用户输入问题

    Git - 忽略配置文件

    git: "Updates were rejected because the tip of your current branch is behind.."但如何查看差异?

    Git:找出你 fork 的仓库的 URL 或名称

    ssh - 如何使用 SourceTree 配置 Bitbucket 应用程序密码?

    用户的 Gitlab 工作流程和配置

    docker - Docker 在提交到 GitLab 时引入构建管道后的未知 list