Problem with JSchClient
After changing the URL in a git vcs-root TeamCity cant fetch from a remote via ssh anymore:
---8<---Snippet from c:\BuildAgent\logs\teamcity-vcs.log -
[2018-01-05 10:54:05,518] INFO - jetbrains.buildServer.VCS - [E:\ETNG\ESPRIT]: "C:\Program Files\Git\bin\git.exe" -c credential.helper= fetch --progress origin +refs/heads/local/BiS-Integration:refs/remotes/origin/local/BiS-Integration
[2018-01-05 10:59:53,418] WARN - jetbrains.buildServer.VCS - '"C:\Program Files\Git\bin\git.exe" -c credential.helper= fetch --progress origin +refs/heads/local/BiS-Integration:refs/remotes/origin/local/BiS-Integration' command failed.
exit code: 128
stderr: Kerberos username [bob]: fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
---8<----
Asking for a "Kerboros username" here is the following call:
C:/BuildAgent/jre/bin/java" -cp "..." jetbrains.buildServer.buildTriggers.vcs.git.agent.JSchClient git@gitlab-berlin.dptechnology.com "git-upload-pack 'BS/ESPRIT.git'"
(I have left out the argument of the -cp parameter for brevity)
I can run the same command in a console window and get the same result.
The call never terminates and the whole build is canceled after 1800 seconds of inactivity.
Everything happens on the build agent. The agent itself runs on Windows 10. Not as a windows-service but started manually from a normal user account (bob).
The authentication method in the vcs-root is set to "Uploaded Key" and a valid key is selected.
The file C:\Users\bob\.ssh\known_hosts already contains the ssh-rsa key of the host gitlab-berlin.dptechnology.com.
Any idea, as to what I'm missing here?
Please sign in to leave a comment.
For reference in case another user has a similar issue, it's being investigated in our tracker here: https://youtrack.jetbrains.com/issue/TW-53210