Jenkins Slave Permission Denied while copying slave.jar

前端 未结 5 1578
迷失自我
迷失自我 2021-02-15 12:21

I get a permissions denied but don\'t know why. From my jenkins master I was able to run the following command using ssh-rsa-key

scp /var/cache/jenkins/war/WEB-INF

相关标签:
5条回答
  • 2021-02-15 12:41

    Granting

    sudo chmod -R 777 /var/lib/jenkins 
    

    works for me

    0 讨论(0)
  • 2021-02-15 12:53

    For anyone with an external drive, check that it's mounted correct:

    drwxrwxrwx+  2 App   admin   68 Aug 25 19:33 Jenkins_Support
    drwxrwxr-x  19 App   staff  714 Sep 25 10:46 Jenkins_Support 1
    

    This might be a problem

    0 讨论(0)
  • 2021-02-15 12:58

    If you changed a user to connect to slave, please also make sure slave destination directory is empty (not containing slave.jar copied there by previous user). This is kind of stupid, but costed me a time.

    0 讨论(0)
  • 2021-02-15 13:04

    sudo chmod -R 777 /var/jenkins

    0 讨论(0)
  • 2021-02-15 13:07

    It looks like the problem is tied to your Remote root directory setting. That needs to be the location of the slave.jar, as Jenkins will try to execute it from there.

    As for the permissions, the Remote Root Directory (whatever you set it to) needs to be configured to allow Jenkins to access it.

    Therefore, if you change your Remote root directory setting to be /var/jenkins/ in your case, it should launch the Jenkins slave successfully.

    0 讨论(0)
提交回复
热议问题