Git Fetch Fails Using SSH to Visual Studio Team Services


Has anyone been able to get TeamCity to work with VSTS over SSH? I have gotten it working without issue using the console on the same server as the TeamCity installation, but I have not been able to get it to work from within a build configuration. It seems to hang for either a half hour or a full hour (why so long?) before an error is thrown and the build fails.

  • TeamCity version 10.0.1, Git version (also used git
  • The "Test Connection" yields a success message on the VCS setup page
  • I'm using an uploaded private key (this would be one possible difference in how the terminal behaves as opposed to TC)
  • It may not matter but when using SSH, but I have tried disabling the credentials manager as described here.
  • This issue mentions using a certain build of git-plugin, but I don't see where to download it (again, may not matter with SSH)
  • I am currently using the "Always checkout files on server" option for this build configuration (I have had it set to agent before also)

Log from latest attempt:

[17:03:49]Finalize build settings
[17:03:54]Collecting changes in 1 VCS root (1h:0m:07s)
[17:03:54][Collecting changes in 1 VCS root] VCS Root details
[17:03:54][VCS Root details] "VSTS (Cr repo)" {instance id=170, parent internal id=21, parent id=VstsCrRepo, description: "ssh://"}
[18:04:01]Failed to collect changes, error: Error collecting changes for VCS repository '"VSTS (Cr repo)" {instance id=170, parent internal id=21, parent id=VstsCrRepo, description: "ssh://"}' 'git fetch' command failed. stderr: org.eclipse.jgit.errors.TransportException: ssh:// session is down at org.eclipse.jgit.transport.JschSession$JschProcess.<init>( at org.eclipse.jgit.transport.JschSession$JschProcess.<init>( at org.eclipse.jgit.transport.JschSession.exec( at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>( at org.eclipse.jgit.transport.TransportGitSsh.openFetch( at org.eclipse.jgit.transport.FetchProcess.executeImp( at org.eclipse.jgit.transport.FetchProcess.execute( at org.eclipse.jgit.transpo...
[18:04:03]Build finished
Comment actions Permalink

I have exactly the same problem.

Comment actions Permalink

Hi guys,

Sorry for delay in replying. We were able to reproduce the issue, please watch/vote for the request:

Please use https and login via username/password as current workaround.
We are sorry for the inconvenience.


Please sign in to leave a comment.