Can you configure which ssh-agent teamcity will upload a secret key to when using the SSH Agent build feature?

I am trying to automate fabric (fabfile.org) deploys in teamcity. I have a linux tc server and windows tc agents. Due to how we have our linux servers configured we can only authenticate with keys. This seemed like a perfect fit for the SSH Agent build feature.

 

The issue I am running into is that I have two versions of ssh and ssh-agent on the build servers. One comes from an installation of Git and the other is from OpenSSH which I manually added. From what I can gather fabric which leverages a python implementation of ssh in the package paramiko cannot communicate with the ssh-agent from the git install but it can with OpenSSH. And what it appears is that Teamcity when uploading an ssh key to the ssh agent will find and upload it to the Git version of ssh-agent.

 

Is there a way to change which ssh-agent TC uploads the key to?

0
1 comment
Hi! TeamCity will use the `ssh-agent` executable that is resolved first from the `Path` environment variable. Unfortunately, currently, TeamCity might not work well with the `ssh-agent` coming from the Windows native OpenSSH implementation. Please see this item in the public TeamCity issue tracker: https://youtrack.jetbrains.com/issue/TW-55164

In the meantime, if the Git version of `ssh-agent` doesn't work with Fabric, consider trying the version coming with Cygwin. I cannot guarantee it will work with Fabric, but reportedly it works with TeamCity, so it is worth giving it a shot.
0

Please sign in to leave a comment.