2017-07-14 114 views
0

我一直試圖配置一個jenkins作業,該作業應該用子模塊克隆git repo。一切順利,直到遇到「混帳子模塊更新」它返回以下錯誤:無法在jenkins中籤出git子模塊

12:03:17 Submodule '<name>' (https://<url>.git) registered for path '<name>' 12:03:17 + git submodule update 12:03:17 Cloning into '<name>'... 12:03:18 fatal: could not read Username for 'https://github.com': No such device or address 12:03:18 fatal: clone of 'https://<name2>' into submodule path 'data_gateway' failed 12:03:18 Build step 'Execute shell' marked build as failure 12:03:18 Finished: FAILURE 我可以用我的用戶名(不詹金斯) 我試圖創造詹金斯鍵克隆使用ssh主回購用戶並將它們添加到github,並嘗試使用用戶和密碼,但沒有人擺脫此問題。

一直在讀取負載,但找不到任何解決方案。任何指針將高度讚賞,

由於

+0

https://stackoverflow.com/questions/36471981/jenkins-and-updating-git-submodules這可以幫助你嗎?檢查你的git版本 – pic0

回答

0

我最後固定它增加對詹金斯機的ssh密鑰到github上,並使用用於子模塊的遠程URL的SSH版本。在jenkins的憑證配置中,您可以設置機器的實際ssh密鑰。

+0

經過一番研究,我發現將conftest.py從根文件夾移動到tests /文件夾會修復它,但是我已經在某處讀過conftest.py應該放在根文件夾中,所以我並不高興用這個解決方案 –