簡體   English   中英

詹金斯使用我的git項目創建jar

[英]Jenkins creating jar by using my git project

我創建了一個簡單的jenkins項目,在build部分,我使用了shel bash腳本(執行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的節點SSH時,可以在/ home / ubuntu目錄中git clone但不能通過jenkins克隆嗎?

有沒有更好的方法來避免克隆並將我的jar放在jenkins節點中的某個位置?

似乎Jenkins正在使用其他用戶(UBUNTU除外)運行。 通常,Jenkins將與Jenkins用戶一起運行。 因此,Jenkins用戶可能沒有權限在/ home / ubuntu中創建目錄。

可能的解決方案:將/ home / ubuntu文件夾訪問權限授予運行Jenkins的用戶

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM