2013-08-30 158 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时,我尝试克隆每个回购时出现此错误。一旦我将它回滚,一切都开始奏效。