为 TeamCity 代理配置 ssh-agent

为 TeamCity 代理配置 ssh-agent

我在 CentOS 7.3 服务器上安装了 TeamCity 代理,并尝试使用“SSH 代理”构建功能来构建使用 的脚本scp。但是,由于 TimeoutException,它总是失败:

[12:39:32]  [Step 1/4] Failed to load SSH key 'Staging & Deployment Key_'
[12:39:31]  [Step 1/4] 'ssh-add /home/agent/002/temp/buildTmp/teamcity979243148311152591sshKey' command failed
exception: jetbrains.buildServer.ProcessTimeoutException: Timeout exception: the process did not produce output longer than 5 seconds; Process: ssh-add /home/agent/002/temp/buildTmp/teamcity979243148311152591sshKey
exit code: -1
[12:39:31]  [Step 1/4] Starting: /home/agent/002/temp/agentTmp/custom_script5200058812461913901
[12:39:31]  [Step 1/4] in directory: /home/agent/002/work/7facf668c0fd7484
[12:39:32]  [Step 1/4] Process exited with code 0
[12:39:32]  [Step 1/4] Step Create local directories (Command Line) failed

谁能告诉我这是 SSH 问题、代理设置问题还是构建配置问题? TeamCity 文档声称这应该是开箱即用的,所以他们对解决这个问题没有太大的帮助。

相关内容