的用户
我已经在一个简单的jenkins项目中,在构建部分,我使用shel bash脚本(execute shell)如下:
cd /home/ubuntu
git clone https://github.com/Bazarganigilani/AppEngineCron.git
mvn clean install
但是,当我构建项目时,我会面对
+ cd /home/ubuntu
+ git clone https://github.com/Bazarganigilani/AppEngineCron.git
fatal: could not create work tree dir 'AppEngineCron': Permission denied
Build step 'Execute shell' marked build as failure
Finished: FAILURE
当我向有这个jenkins的节点时,我可以在我的/home/ubuntu目录中git克隆,但不能通过jenkins?
有更好的方法避免克隆并在詹金斯节点中的某个地方制作罐子吗?
似乎詹金斯(Jenkins)与其他用户(除了Ubuntu)一起运行。詹金斯(Jenkins)主要将与Jenkins用户一起运行。因此,詹金斯用户可能没有权限在/home/ubuntu中创建目录。
可能的解决方案:给/home/ubuntu文件夹访问正在运行jenkins