Git Fetch Fails Using SSH to Visual Studio Team Services

Answered

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 2.10.0.windows.1 (also used git 2.9.3.windows.3)
  • 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://myacct@myacct.visualstudio.com:22/DefaultCollection/_git/Cr#refs/heads/master"}
[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://myacct@myacct.visualstudio.com:22/DefaultCollection/_git/Cr#refs/heads/master"}' 'git fetch' command failed. stderr: org.eclipse.jgit.errors.TransportException: ssh://myacct@myacct.visualstudio.com:22/DefaultCollection/_git/Cr: session is down at org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:157) at org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:118) at org.eclipse.jgit.transport.JschSession.exec(JschSession.java:91) at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:262) at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:161) at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136) at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122) at org.eclipse.jgit.transpo...
[18:04:03]Build finished
2 comments

Hi guys,

Sorry for delay in replying. We were able to reproduce the issue, please watch/vote for the request: https://youtrack.jetbrains.com/issue/TW-47102.

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

0

Please sign in to leave a comment.