TeamCity agent error "failed to perform checkout on agent"

mishod picture mishod · May 31, 2012 · Viewed 18k times · Source

I am running my TeamCity 7 server and agent on MacOS. My repo is on github. I use ssh and I know that the authentication is correctly configured, because the test is successful.

The build works fine when I use VCS Checkout Mode "Automatically on server", however when I use VCS Checkout mode "Automatically on agent" I get this error.

[13:40:35][Updating sources] Failed to perform checkout on agent: '/usr/bin/git fetch --progress origin +refs/heads/master:refs/remotes/origin/master' command failed.
stderr: java.io.IOException: Authentication failed
    at org.jetbrains.git4idea.ssh.SSHMain.authenticate(SSHMain.java:275)
    at org.jetbrains.git4idea.ssh.SSHMain.start(SSHMain.java:159)
    at org.jetbrains.git4idea.ssh.SSHMain.main(SSHMain.java:139)
fatal: The remote end hung up unexpectedly

What am I missing?

Answer

max picture max · Feb 21, 2013

Try adding teamcity.git.use.native.ssh=true as a config parameter into your build configuration.

It is what helped me solve a similar problem. I learned this trick from here.