報錯1:
WARNING: An exception was caught when invoking perform
jenkins.plugins.publish_over.BapPublisherException: Exception when publishing, exception message [Permission denied]
at jenkins.plugins.publish_over.BPCallablePublisher.invoke(BPCallablePublisher.java:68)
at jenkins.plugins.publish_over.BPCallablePublisher.invoke(BPCallablePublisher.java:37)
at hudson.FilePath.act(FilePath.java:996)
at hudson.FilePath.act(FilePath.java:974)
at jenkins.plugins.publish_over.BPInstanceConfig.perform(BPInstanceConfig.java:138)
at jenkins.plugins.publish_over.BPPlugin.perform(BPPlugin.java:111)
at jenkins.plugins.publish_over_ssh.BapSshAlwaysRunPublisherPlugin.perform(BapSshAlwaysRunPublisherPlugin.java:55)
at jenkins.plugins.publish_over_ssh.BapSshPostBuildWrapper$1.tearDown(BapSshPostBuildWrapper.java:67)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:908)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1728)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:405)
Caused by: 3: Permission denied
at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2846)
at com.jcraft.jsch.ChannelSftp._put(ChannelSftp.java:594)
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:540)
報錯二:
The authenticity of host '[123.57.163.30]:4650 ([123.57.163.30]:4650)' can't be established.
RSA key fingerprint is 39:4b:8b:70:37:47:d2:2a:c7:73:8f:25:66:3e:29:98.
Are you sure you want to continue connecting (yes/no)? Nov 14, 2017 6:23:13 PM hudson.model.Run execute
報錯三:
Pseudo-terminal will not be allocated because stdin is not a terminal.
/usr/bin/ssh -t -t -p 4650 zcq@123.57.163.30
報錯四:

解決辦法:
刪除了工程,重新生成的,終歸操作還是再jenkins上生成公鑰,復制到要遠程的服務器上,要遠程的服務器上一共3個文件
authorized_keys id_rsa id_rsa.pub
操作正確結果:

