我正在MacOS上运行TeamCity 7服务器和代理。我的仓库在github上。我使用ssh并且知道身份验证已正确配置,因为测试成功。

当我在服务器上自动使用VCS Checkout模式时,构建工作正常,但是当我在代理中自动使用VCS Checkout模式时,出现此错误。

[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


我想念什么?

最佳答案

尝试将teamcity.git.use.native.ssh = true作为配置参数添加到您的构建配置中。

这就是帮助我解决类似问题的原因。我从here学到了这个技巧。

08-27 21:29