2012-03-04 89 views
8

我試過各種不同的東西,我不能讓詹金斯和git一起玩。Jenkins Git插件 - 401

我已經設置了我的ssh密鑰並驗證了我可以ssh到git集線器並且我收到了消息。 我也試過沒有.git擴展。我已經嘗試使用url中的用戶名,用戶名和密碼,並且根本沒有username/passsord。無關緊要。

我也試過用管理員用戶和普通的推/拉用戶。

我試圖打的git倉庫是通過一個「組織」,但我在一個有權訪問的團隊。

Cloning repository origin 
ERROR: Error cloning remote repo 'origin' : Could not clone https://github.com/xxx/xx 
hudson.plugins.git.GitException: Could not clone https://github.com/xxx/xx 
    at hudson.plugins.git.GitAPI.clone(GitAPI.java:245) 
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1073) 
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1014) 
    at hudson.FilePath.act(FilePath.java:788) 
    at hudson.FilePath.act(FilePath.java:770) 
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1014) 
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1195) 
    at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:579) 
    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:468) 
    at hudson.model.Run.run(Run.java:1408) 
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478) 
    at hudson.model.ResourceController.execute(ResourceController.java:88) 
    at hudson.model.Executor.run(Executor.java:238) 
Caused by: hudson.plugins.git.GitException: Error performing command: git clone --progress -o origin https://github.com/xxxx/xx /var/lib/jenkins/jobs/test/workspace 
Command "git clone --progress -o origin https://github.com/xxxx/xx /var/lib/jenkins/jobs/test/workspace" returned status code 128: Initialized empty Git repository in /var/lib/jenkins/jobs/test/workspace/.git/ 
error: The requested URL returned error: 401 while accessing https://github.com/xxxx/xx/info/refs 
+0

它是一個私人回購協議? – iltempo 2012-03-04 10:27:58

+0

是的,它是一個私人的回購 – 2012-03-04 17:00:33

回答

12

嘗試使用R/W地址使用SSH密鑰克隆私人回購協議:

[email protected]:xxx/xx.git

+0

完美的作品。我還沒有15歲,所以我不能回答。 – 2012-03-04 19:47:01

+0

現在你是;)你也可以標記答案是正確的嗎?謝謝。 – iltempo 2012-03-04 19:55:32

+0

完成。再次感謝! – 2012-03-05 00:41:55

0

如果您在URL上傳遞憑據,請確保它們是URL編碼的。另外請確保您使用的是基本身份驗證。

+0

是啊..我沒有任何字符在那裏將需要編碼。奇怪的是,我甚至無法從命令行運行該命令。我可以從我的開發箱上的命令行推/拉。我可以推拉得很好,但如果我運行這個克隆命令,它就會爆炸。 – 2012-03-04 10:28:43