为什么git push失败并显示“操作超时”?

5
MacMini $ git push origin master
Counting objects: 1916, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (1751/1751), done.
Read from remote host codebasehq.com: Operation timed out
fatal: The remote end hung up unexpectedly
error: pack-objects died of signal 13
error: pack-objects died with strange error
error: failed to push some refs to 'git@codebasehq.com:xx/xx/xx.git'

这个问题不是有点像 https://dev59.com/ckrSa4cB1Zd3GeqPWXTR 吗? - VonC
2个回答

8
当代 UTM( 统一威胁模型)防火墙会在流中误识别恶意软件、打包数据或不安全命令的痕迹,从而干扰出站数据......这些虚假警报经常发生。网络上的这些安全设备或目标端可能会解释为何某些项目可以顺利推进而其他项目则断开连接。
如果是这种情况,您可以使用不同的协议来建立连接,例如 ssh://https:// 而非 git://,以避免触发。

如何更改协议? - Alexander
1
@Alexander - 使用“git remote”命令将URL更改为使用“https://...” URL:https://help.github.com/en/articles/changing-a-remotes-url - ewall

-2

看起来你的网络连接有问题。你能访问codebasehq.com吗,特别是使用你所用的网络协议。你有正确的代理服务器配置吗?你能拉取其他项目吗?


是的,我可以将其他项目推送到codebasehq.com...只有一些项目会出现问题... - Simon
似乎是超时或一些奇怪的数据模式。这总是发生在相同的位置或相同的时间吗?您可以尝试使用Wireshark或tcpdump查看数据流是否存在任何可疑情况。 - Rudi
是的。它总是发生在一个特定的点……有没有冗长的git命令可以识别被拒绝的文件? - Simon

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接