Reputation: 9565
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
Upvotes: 1
Views: 3326
Reputation: 1496
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
Upvotes: 1
Reputation: 14777
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.
Upvotes: 1
Reputation: 19279
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.
Upvotes: 2