Jenkins publish over ssh success to connect the server but failed put file
12,466
Permission denied when put dev-xx-xx.tgz
. So check the file's permission setup: /home/Ubuntu/deploy/dev-xx-xx.tgz
Related videos on Youtube
![Cuzi](https://i.stack.imgur.com/2WTr5.png?s=256&g=1)
Author by
Cuzi
Updated on September 18, 2022Comments
-
Cuzi almost 2 years
I have a problem that when I do build to my job, its cannot put my file on the server directory in console output i get the message "ERROR: Exception when publishing, exception message [Permission denied]"
i have the following log output:
SSH: Connecting from host [rp_ci] SSH: Connecting with configuration [web-dev] ... SSH: Creating session: username [ubuntu], hostname [xx.xx.xx.xxx], port [22] SSH: Connecting session ... SSH: Connected SSH: Opening SFTP channel ... SSH: SFTP channel open SSH: Connecting SFTP channel ... SSH: Connected SSH: Remote root is not absolute, getting absolute directory from PWD SSH: cd [/home/ubuntu] SSH: OK SSH: cd [deploy/] SSH: OK SSH: put [dev-xx-xx.tgz] SSH: Disconnecting configuration [web-dev] ... ERROR: Exception when publishing, exception message [Permission denied] Build step 'Send build artifacts over SSH' changed build result to UNSTABLE Finished: UNSTABLE
For the target server Im using ubuntu server on AWS EC2 using nginx.
Someone know how to fix that's issue? I not found any clue for it around the web. Thanks!
-
TheFiddlerWins over 9 yearsWhat happens if you run the script manually as the Jenkins user? Any reason you're not using SCP instead of SFTP?
-
Cuzi over 9 yearsit is work in all my other servers, while Im using SCP I prompt an error:" Host key verification failed."
-