2013-08-30 157 views
3

我需要一些幫助,我曾與Github上/詹金斯遇到了身份驗證問題。詹金斯/ Github的錯誤克隆遠程回購「出身」:無法克隆

設置如下: 詹金斯大師是從上OSX 運行Windows 詹金斯可以從

當試圖從我們的私人混帳回購協議,我們看到下面的錯誤拉,這個錯誤傳達罰款不在OSX終端的主控或其他Linux從屬設備和克隆上。

Started by user xxxxxxxxxxxx 
[EnvInject] - Loading node environment variables. 
Building remotely on MAC01 in workspace /var/jenkins/workspace/xxxxxxxxxxxx 
Checkout:NativeiOSSlots//var/jenkins/workspace/xxxxxxxxxxxxx - [email protected]:MAC01 
Using strategy: Default 
Last Built Revision: Revision 7232678c31bf2c6f3c4bd5a66b349edf9288440c (origin/HEAD, origin/master) 
Cloning the remote Git repository 
Cloning repository <repo url> 
git --version 
git version 1.8.3.1 
ERROR: Error cloning remote repo 'origin' : Could not clone <repo url> 
hudson.plugins.git.GitException: Could not clone <repo url> 
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:226) 
    at org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.clone(AbstractGitAPIImpl.java:57) 
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.clone(CliGitAPIImpl.java:33) 
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1012) 
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:948) 
    at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2387) 
    at hudson.remoting.UserRequest.perform(UserRequest.java:118) 
    at hudson.remoting.UserRequest.perform(UserRequest.java:48) 
    at hudson.remoting.Request$2.run(Request.java:326) 
    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) 
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:138) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) 
    at java.lang.Thread.run(Thread.java:680) 
Caused by: hudson.plugins.git.GitException: Command "/Applications/GitHub.app/Contents/Resources/git/bin/git clone --progress -o origin <repo url> /var/jenkins/workspace/xxxxxxxxxx" returned status code 128: 
stdout: Cloning into '/var/jenkins/workspace/xxxxxxxxxx'... 

stderr: remote: Repository not found. 
fatal: Authentication failed for '<repo url>' 

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:790) 
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$100(CliGitAPIImpl.java:33) 
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:224) 
    ... 14 more 

任何想法?

回答

-1

當與運行詹金斯用戶運行它是否真的克隆從終端罰款?

您可能還沒有設置您的SSH訪問正常。看到這個:Could not clone repository

+0

我面臨同樣的問題,它併成功克隆,如果我從主到從SSH協議。有任何想法嗎? –

0

最有可能的用戶,詹金斯奴隸運行在您的Mac沒有正確設置爲github(沒有正確的證書)。在我的Mac Slave上,用戶名爲jenkins。身份登錄到你的奴隸用戶,看看你是否可以這樣做:

ssh -T [email protected] 

如果不工作,請確保您有安裝了合適的證書和機器可以看到外面的世界。

+0

ssh -T [email protected]不會導致任何問題,我使用命令來確認這是從命令行工作的是git clone https://github.com/REPO/NAME,我不會提示輸入我的用戶名或通過,因爲它被緩存在OSX鑰匙串 - 什麼不確定的是,如果我使用HTTPS,那麼我不應該需要SSH密鑰? – user2732625

+0

你確定jenkins奴隸用戶是你做實驗的人嗎?你用什麼網址克隆?我爲jenkins用戶在〜/ .ssh中擁有我的github證書(您可能只是想嘗試一下)。 – sdelmas

2

我正面臨同樣的問題。 Jenkin無法將我的git repo克隆到本地PC。

解決方案:

  1. 開始SERVICES.MSC
  2. 轉到詹金斯服務,並打開它的屬性
  3. 轉到登錄選項卡,並給你的A/C名和密碼。
  4. 重新啓動服務。

這些步驟解決了我的問題,因爲我在那裏給了我的企業登錄名和密碼。

-1

我也有這個問題。我最終不得不將我的Git Client插件降級到1.6.4。當我運行1.8.0時,我嘗試克隆每個回購時出現此錯誤。一旦我將它回滾,一切都開始奏效。