Teamcity 和 git 存储库,连接失败
从 TeamCity 6.5 对我的 git 存储库(位于 AppHarbor)进行测试连接时,我收到此错误。有人可以更仔细地解释这个错误吗?
001E# service=git-upload-pack 无效广告
I am getting this error when doing a test connection against my git repository (located on AppHarbor) from TeamCity 6.5. Can anybody explain this error more closely?
invalid advertisement of 001E# service=git-upload-pack
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这很可能是由于基于 TeamCity JGit 的客户端与 AppHabor 的基于 WebGitNet 的 Git 实现之间的不良交互造成的。 此处提到了相同的症状。我将尝试看看我们是否可以向后移植该补丁。
编辑:正如rarouš提到的,使用Github集成 (或者 Bitbucket 的 git 存储库)也是一个非常好的选择。
This is most likely caused by a bad interaction between the TeamCity JGit-based client and AppHabor's WebGitNet-based Git-implementation. The same symptoms are mentioned here. I'm going to try and see if we can back-port that patch.
Edit: As rarouš mentions, using the Github integration (or a git repository at Bitbucket) is also a really good option.
我检查了与 Wireshark 的网络交互,发现 TeamCity 使用的 JGit 将此数据包视为不正确:
确切地说,它被
charset=utf-8
部分(在调用response.执行 Write(string)
)。不过,msysgit 可以正确处理此类数据包。这通过将
Write(string)
替换为二进制文件来解决此问题写。其他选项是显式指定response.Charset = null;
。我测试了 GitWebAccess 上的信息,它有类似的问题,并通过修复 此处。
I checked network interaction with Wireshark and I found that JGit which TeamCity uses treats this packet as incorrect:
Precisely it is confused by
charset=utf-8
part (which was added when call toresponse.Write(string)
is performed). msysgit handles such packet correctly, though.This fixes the issue by replacing
Write(string)
with binary write. Other option is to specifyresponse.Charset = null;
explicitly.I tested info on GitWebAccess which has similar problems and made pull request with fix here.
当尝试使用 EGit 从 Eclipse 签出项目时,我遇到了同样的错误。就我而言,我只是给出了错误的项目路径。如果您因为收到此错误而来到这里 ->首先检查您的存储库路径
I got the same error when trying to checkout a project from Eclipse with EGit. In my case I simply gave the wrong project path. If you come here because you got this error -> check your repository path first