Teamcity 和 git 存储库,连接失败

发布于 2024-12-09 21:49:16 字数 202 浏览 6 评论 0原文

从 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

凡间太子 2024-12-16 21:49:16

这很可能是由于基于 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.

維他命╮ 2024-12-16 21:49:16

我检查了与 Wireshark 的网络交互,发现 TeamCity 使用的 JGit 将此数据包视为不正确:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/x-git-upload-pack-advertisement; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Thu, 05 Jan 2012 09:56:30 GMT
Content-Length: 255

001d# service=git-upload-pack ... <other stuff>

确切地说,它被 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:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/x-git-upload-pack-advertisement; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Thu, 05 Jan 2012 09:56:30 GMT
Content-Length: 255

001d# service=git-upload-pack ... <other stuff>

Precisely it is confused by charset=utf-8 part (which was added when call to response.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 specify response.Charset = null; explicitly.

I tested info on GitWebAccess which has similar problems and made pull request with fix here.

帅冕 2024-12-16 21:49:16

当尝试使用 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文