I am using TeamCity on ubuntu (TeamCity Professional 9.1.7 (build 37573)
). And having some problems with automatic merges lately (git). I haven't changed anything in the configuration from when it used to work. I tried to remove the work directory. it only helped for a couple of merges.
Symptoms: The build log looks clean, and I am getting this on the build overview:
Failed to merge sources in VCS root foo. Merge error 'git fetch' command failed. stderr: [email protected]:foo/foo.git: channel is not opened. exit code: 1.
Although, in the agent running this i am getting a totally different error in teamcity-vcs.log
:
[2016-03-30 15:14:31,722] INFO - jetbrains.buildServer.VCS - [/home/ubuntu/BuildAgent/work/7676127c0a691f42]: /usr/bin/git show-ref refs/remotes/origin/foo [2016-03-30 15:14:31,775] INFO - jetbrains.buildServer.VCS - [/home/ubuntu/BuildAgent/work/7676127c0a691f42]: /usr/bin/git log -n1 --pretty=format:%H%x20%s 193f46d88205c5e419a8a7458e742ce9b598cca8 -- [2016-03-30 15:14:31,797] WARN - jetbrains.buildServer.VCS - '/usr/bin/git log -n1 --pretty=format:%H%x20%s 193f46d88205c5e419a8a7458e742ce9b598cca8 --' command failed. stderr: fatal: bad object 193f46d88205c5e419a8a7458e742ce9b598cca8 [2016-03-30 15:14:31,798] INFO - jetbrains.buildServer.VCS - [/home/ubuntu/BuildAgent/work/7676127c0a691f42]: /usr/bin/git fetch --progress origin +refs/heads/foo:refs/remotes/origin/foo [2016-03-30 15:14:35,832] WARN - jetbrains.buildServer.VCS - Error output produced by: /usr/bin/git fetch --progress origin +refs/heads/foo:refs/remotes/origin/foo [2016-03-30 15:14:35,832] WARN - jetbrains.buildServer.VCS - remote: Counting objects: 2, done.ESC[K remote: Compressing objects: 50% (1/2) ESC[K remote: Compressing objects: 100% (2/2) ESC[K remote: Compressing objects: 100% (2/2), done.ESC[K remote: Total 2 (delta 1), reused 0 (delta 0)ESC[K From bitbucket.org:bar/bar 62ba378..193f46d foo -> origin/foo
As if the log command failed..
Thanks.
Update: I got an update that there is anecdotal evidence that this is due to changes specifically in BitBucket's git over SSH servers.
Per https://youtrack.jetbrains.com/issue/TW-46052, the problem has been fixed. The fix will be shipped with the next release, either 9.1.8 or 10. If you don't want to wait for the release, you can manually update the git plugin by downloading it from here (logging in as a guest, or creating an account on JetBrains' build server) and replacing it in your installation.
jetbrains.git.zip
in %TEAM_CITY%/webapps/ROOT/WEB-INF/plugins
replacing the existing oneThis fixed the problem for me and others.
TeamCity used ssh multiplexing which was recently disabled in Bitbucket Cloud. If you are affected by this problem, please watch the https://youtrack.jetbrains.com/issue/TW-46052, fixes will be posted there (at the moment of writing there is a fix for TeamCity 9.1.x and 9.0.x). A workaround without installing a newer git-plugin is to use https or anonymous protocol instead of ssh.
Update
The initial fix caused changes collection to fail with timeout errors in TeamCity 8.1.x and 9.0.x, this is fixed now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With