2013-01-09 60 views
4

我正在使用git和hudson構建一些測試項目。我完成了所有的哈德森配置(至少我認爲是),並且我下載了git for windows。該存儲庫位於我們的辦公室linux機器上。當我在這裏構建測試時出現錯誤:Gud在Hudson上返回null

Started by user anonymous 
Checkout:workspace/C:\Users\username\.hudson\jobs\GitTest\workspace - [email protected] 
Using strategy: Default 
Checkout:test2/C:\Users\username\git\test2 - [email protected] 
Fetching changes from the remote Git repository 
Fetching upstream changes from [email protected]:/var/gitrepo/test 
ERROR: Problem fetching from origin/origin - could be unavailable. Continuing anyway 
ERROR: (Underlying report) : Error performing command: C:\Program Files (x86)\Git\cmd\git.exe fetch -t [email protected]:/var/gitrepo/test +refs/heads/master:refs/remotes/origin/master 
null 
ERROR: Could not fetch from any repository 
FATAL: Could not fetch from any repository 
hudson.plugins.git.GitException: Could not fetch from any repository 
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:931) 
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:889) 
at hudson.FilePath.act(FilePath.java:791) 
at hudson.FilePath.act(FilePath.java:773) 
at hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:889) 
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:668) 
at hudson.model.AbstractProject.checkout(AbstractProject.java:1515) 
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:521) 
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:428) 
at hudson.model.Run.run(Run.java:1390) 
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:40) 
at hudson.model.ResourceController.execute(ResourceController.java:81) 
at hudson.model.Executor.run(Executor.java:137) 

由於某些原因,fetch命令返回null。當我在命令行嘗試命令時,它只是掛起,沒有輸出,直到我必須殺死它。我一直在研究這一段時間,但無法找到任何答案。

任何幫助將不勝感激。

+1

如果該命令沒有在命令行上工作,它肯定不會在赫德森工作。你可以在命令行中使用git嗎?這是一個糟糕的Git安裝/配置,或只是一個命令? – GreyBeardedGeek

+0

我可以在命令行中使用git,我的意思是我已經成功添加了一個github存儲庫,並且能夠推送和拉取內容。當我嘗試運行那一個命令時,它只是掛起 – user1964821

+0

掛在命令行,還是掛在哈德遜? – GreyBeardedGeek

回答

1

我發生了類似這樣的事情,原來它是指紋(如果你的git使用RSA驗證),在我們第一次查詢repo時不會自動接受。

我解決它通過在回購哈得遜用戶做人工查詢:

git ls-remote -h [email protected] HEAD 
相關問題