4
我試圖建立我在詹金斯的應用程序,它是在Github上的私人回購,也有一個私人子模塊。
我可以通過設置它的憑據克隆在詹金斯私人倉庫,但詹金斯無法克隆的子模塊,這裏是一個構建失敗的輸出:
Started by an SCM change
Building in workspace /var/lib/jenkins/jobs/Project/workspace
Fetching changes from the remote Git repository
Fetching upstream changes from [email protected]:user/repogit
using GIT_SSH to set credentials
Checking out Revision 9cc99b67cc676d0ea8ccd489a8327f5c6dbb8d7f (origin/branch)
[workspace] $ /bin/sh -xe /tmp/hudson2710403018107019432.sh
+ git submodule update --init --recursive
Initialized empty Git repository in /var/lib/jenkins/jobs/repository/submodule/.git/
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
Clone of '[email protected]:user/submodule.git' into submodule path 'repository/submodule/' failed
Build step 'Execute shell' marked build as failure
Discard old builds...
#156 is removed because status FAILURE is not to be kept
Publishing Clover coverage report...
No Clover report will be published due to a Build Failure
Sending e-mails to:
Finished: FAILURE
這裏就是我試圖做詹金斯
- 試圖設置附加行爲「高級子模塊的行爲」,但沒有成功。
- 試圖與PHPUnit的運行測試之前設置了一個新臺階:
git submodule update --init --recursive
- 試圖設置在我的子模塊的項目一個Git倉庫太大,不只是主存儲庫正在測試中,也沒有運氣。
所有這些導致錯誤,說詹金斯找不到子模塊的存儲庫。
如何解決這個問題的任何想法?
(用戶名,路徑和庫是正確的,我只是改變了他們張貼在這裏)
那麼,有沒有辦法使用直接輸入? – Kostanos
不是我發現..這是我得到它的唯一方法。 – Brayan
確認,密鑰必須位於具有默認名稱(id_rsa和id_rsa.pub)的文件中。如果爲.ssh/config文件中的文件指定了非標準名稱,則初始克隆會成功,但子模塊更新將失敗。 – BitByteDog