當rsync的使用與詹金斯作爲在CentOS 6.4執行shell命令,它失敗:爲什麼rsync的失敗,詹金斯
[workspace] $ /bin/sh -xe /tmp/hudson3424899639384884888.sh
+ rsync -av /var/lib/jenkins/jobs/myjob/workspace/target/classes/ [email protected]:/home/myuser/test
rsync: Failed to exec ssh: Permission denied (13)
rsync error: error in IPC code (code 14) at pipe.c(84) [sender=3.0.6]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in IPC code (code 14) at io.c(600) [sender=3.0.6]
然而,在命令行工作:
su jenkins
rsync -av /var/lib/jenkins/jobs/myjob/workspace/target/classes/ [email protected]:/home/myuser/test
sending incremental file list
sent 17875 bytes received 83 bytes 3990.67 bytes/sec
total size is 1981027 speedup is 110.31
什麼都有爲了讓它在詹金斯工作也要做?
你有ssh密鑰複製到遠程機器嗎?當你從命令行執行它時,你是否必須鍵入你的用戶名和密碼? – davidrv87
ssh密鑰在遠程機器上,當我從命令行執行時,我不必鍵入我的用戶名和密碼。 – miloxe