VCS problem 'git fetch' command failed stderr: http://foo/bar.git: 302 Found

Hello,

Today, out of nowhere TC 9.1.3 (build 37176) started to fail while checking out changes from git. We use Atlassian Stash as Git server. I have tested the connection in VCS settings and it succeeds.

But when I run the build on any branch I get the following error:

Failed to collect changes, error: Error collecting changes for VCS repository '"Foo-Bar-git (1) (1) (1) (1)" {instance id=41, parent internal id=22, parent id=FooBargit1111, description: "http://foo/bar.git#refs/heads/develop"}';
'git fetch' command failed.
stderr: http://foo/bar.git: 302 Found
exit code: 1

If I add internal server property "teamcity.git.fetch.separate.process=false", build fails with a slightly different error message:

Failed to collect changes, error: Error collecting changes for VCS repository '"Foo-Bar-git (1) (1) (1) (1)" {instance id=41, parent internal id=22, parent id=FooBargit1111, description: "http://foo/bar.git#refs/heads/develop"}';
Collecting changes failed: org.eclipse.jgit.errors.TransportException: http://foo/bar.git: 302 Found

Any ideas how to resolve this problem? It's blocking our development team and have to be resolved ASAP!

EDIT: I reviewed all threads in this forum which contained "git fetch" keywords and I didn't find anything related to "stderr 302 Found". Please advise!

EDIT2: I don't know what was the issue, but creating a new copy of existing VCS root somehow fixed the issue.

Thanks,
Andrew

1 comment
Comment actions Permalink

Hi Andrew,

please provide teamcity-vcs.log(s) from the TeamCity server machine. Can it be the case that the copy VCS root is not an exact copy, but uses a different protocol, e.g. https instead of http?

0

Please sign in to leave a comment.