通道未打开Teamcity(git)自动合并错误

我在ubuntu上使用TeamCityTeamCity Professional 9.1.7 (build 37573) )。 自动合并最近有一些问题(混帐)。 我从来没有改变configuration中的任何东西。 我试图删除工作目录。 它只是帮助了几个合并。

症状:构build日志看起来很干净,我在构build概述中得到这个:

 Failed to merge sources in VCS root foo. Merge error 'git fetch' command failed. stderr: git@bitbucket.org:foo/foo.git: channel is not opened. exit code: 1. 

虽然在代理运行这个我得到一个完全不同的错误在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 

就好像日志命令失败..

谢谢。


更新:我得到了一个更新,有轶事证据,这是由于在BitBucket的git通过SSH服务器的具体变化。

根据https://youtrack.jetbrains.com/issue/TW-46052 ,问题已得到解决。 该修补程序将与下一个发行版(9.1.8或10)一起发货。如果您不想等待发行版,则可以通过从此处下载来手动更新git插件(以访客身份login或创buildJetBrains的构build服务器上的一个帐户),并在安装中进行replace。

  • closuresTC
  • 将下载的文件jetbrains.git.zip放入%TEAM_CITY%/webapps/ROOT/WEB-INF/pluginsreplace现有文件
  • 重新启动TC

这为我和其他人解决了这个问题。

TeamCity使用了最近在Bitbucket Cloud中禁用的ssh多路复用。 如果你受到这个问题的影响,请看https://youtrack.jetbrains.com/issue/TW-46052 ,修正将会在那里发布(在撰写的时候,TeamCity 9.1.x和9.0有一个修正。 X)。 没有安装新的git-plugin的解决方法是使用https或匿名协议而不是ssh。

更新

在TeamCity 8.1.x和9.0.x中,初始修复导致更改集合失败并出现超时错误, 现在已经修复 。

更新: JetBrains已经发布了针对此问题的补丁 – 详情请参阅https://youtrack.jetbrains.com/issue/TW-46052

我已经两次遇到这个问题,而且很烦人。

对于正确安装TeamCity的Linux用户(例如,有一个单独的用户和一个teamcity服务),这个脚本应该完成所有繁重的工作(假设你有sudo):

 function patch_teamcity_plugin() { # Find teamcity plugin dir. sudo updatedb path_part="webapps/ROOT/WEB-INF/plugins" teamcity_plugin_dir=$(locate $path_part | grep -o -E ".*$path_part" | head -n 1) if [ "$teamcity_plugin_dir" == "" ]; then echo "Cannot find teamcity plugins directory." 1>&2 return 1 fi login_url="https://teamcity.jetbrains.com/guestLogin.html?guest=1" cookie_file=$(mktemp) # Log in as guest. # Wget login - thanks to: http://stackoverflow.com/a/1432161/2041634 wget --save-cookies $cookie_file --keep-session-cookies $login_url # Download the plugin to the teamcity plugin directory. plugin_url="repository/download/TeamCityPluginsByJetBrains_Git_JetBrainsGitPluginTeamCity91x/843194id/jetbrains.git.html" plugin_dest_filename="$teamcity_plugin_dir/jetbrains.git.zip" sudo wget --load-cookies $cookie_file $plugin_url -O $plugin_dest_filename if [ "$?" != "0" ]; then echo "Failed download of plugin." 1>&2 return 1 fi # Copy permissions - thanks to: http://unix.stackexchange.com/a/20646 sudo chown --reference="$teamcity_plugin_dir" "$plugin_dest_filename" sudo chmod 0755 "$plugin_dest_filename" # Restart TeamCity server. sudo service teamcity restart } patch_teamcity_plugin()