问题
I am using the Jenkins publish over SSH plugin to transfer files to a remote server.
When I configure the Publish over SSH plugin and specify a Remote Directory, testing the configuration always fails with this error:
jenkins.plugins.publish_over.BapPublisherException: Failed to change to remote directory [C:\zzTest]
However if I leave the Remote Directory filed blank I get a success message when I test the configuration.
Any ideas as to what I am doing wrong here? The directory definitely exists on the remote server.
回答1:
So it seems the problem was with specifying the absolute path in the Remote Directory field.
The solution is to specify the relative path. So in the scenario above /zzTest is the value which should be entered into the Remote Directory field.
回答2:
- Select "sftp",change "SFTP home path" to "C:\"
Change "ssh server Remote Directory" to "/zzTest"
Test Configuration
来源:https://stackoverflow.com/questions/39926058/jenkins-publish-over-ssh-failed-to-change-to-remote-directory