Using uploaded SSH keys with agent side checkout

Answered

We are currently evaluating TeamCity as a replacement for our CI-solution. I am, however, having difficulties performing an agent side checkout of a GIT repository using an uploaded (passwordless) SSH key. Testing the connection on the server is succesful, but the agent fails to authenticate. The logs indicate that it attempts to use password authentication. The checkout is succesful if I copy the key to the agent's .ssh folder.

The manual page on SSH key management states:

"During the build with agent-side checkout, the Git plugin downloads the key from the server to the agent. It temporarily saves the key on the agent's file system and removes it after git fetch/clone is completed."

Now I'm wondering how I can use the key on the agent since it apparently isn't used automatically? Is it stored in a predictable location so that I can refer to it using the SSH IdentityFile setting? Or am I missing something else?

1
3 comments
Avatar
Permanently deleted user

After further investigation it turns out that I ran into this issue: https://youtrack.jetbrains.com/issue/TW-47704 

I managed to work around the issue for now by patching the trilead-ssh2.jar in the jetbrains.git plugin with a version built from this PR: https://github.com/jenkinsci/trilead-ssh2/pull/9 

Hopefully this will make it into a TeamCity release soon.

2
Avatar
Permanently deleted user

@E Orbons: Can you upload the patched file? I am running into the same problem.

0

Please sign in to leave a comment.