2016-02-19 121 views
0

我試圖啓動新的奴隸代理,但我看到下面的錯誤。你能幫忙解決這個問題嗎? - 我已經在.ssh/authorized_keys中的機器中複製了密鑰,並且能夠手動連接,但從jenkins失敗。 - 所有權限也顯示gud。詹金斯未能啓動奴隸代理

[02/19/16 13:12:34] [SSH] Opening SSH connection to sdc-caoneops- app1.qa.xxxxx.com:22. 
ERROR: Server rejected the 1 private key(s) for App (credentialId:6aced962- 26cd-4c8f-97d3-305c2e2a6540/method:publickey) 
[02/19/16 13:12:34] [SSH] Authentication failed. 
hudson.AbortException: Authentication failed. 
at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1178) 
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:701) 
at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:696) 
at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
at java.lang.Thread.run(Thread.java:745) 
[02/19/16 13:12:34] Launch failed - cleaning up connection 
[02/19/16 13:12:34] [SSH] Connection closed. 

回答

0

當你從主人到奴隸手動ssh,你是這樣做詹金斯主用戶,對不對?您只需要將主機的公鑰複製到從機的〜/ .ssh/authorized_keys中。

  • 添加詹金斯憑據詹金斯私鑰和您使用的是一對從配置「憑證」
  • 在從配置在「遠程根目錄」添加詹金斯用戶的主目錄上的從(其中包含的.ssh/authorized_keys中)