Jenkins GitHub组织管道'checkout scm'在代理(从属/节点)上失败

时间:2017-02-23 03:29:42

标签: git github jenkins jenkins-pipeline

在Linux上,我正在设置一个GitHub Organization文件夹来构建拉取请求。在看到pull reqeust后,Master会对远程远程存储库进行克隆,然后开始执行Jenkins文件。此克隆成功

然后执行Jenkinfile,第一步是'checkout scm'。哪个失败了。

我已尝试过SSH和HTTPS,并且两者都以相同的方式在代理中失败,albiet,使用HTTPS,它使用GIT_ASKPASS而不是GIT_SSH。

我试图打印env.GIT_SSH的内容,结果为null。

我能够使用相同的凭据在代理上手动从respostory中获取,并且它可以正常工作,因此它似乎不是密钥问题。

GIT_SSH应该为NULL是否正确?有没有办法取消设置GIT_SSH,只使用代理上的凭据(哪个工作)。??

22:12:57 Cloning the remote Git repository
22:12:57 Cloning repository git@github.com:BC/zA.git
22:12:57  > git init /var/jenkins/workspace/tion_zA_PR-265-head-4KZDN3K54TSHW2MGKTNQGMP4QCTNKXIO4X54MUP32ONUC7LFQ3UQ # timeout=10
22:12:58 Fetching upstream changes from git@github.com:BC/zA.git
22:12:58  > git --version # timeout=10
22:12:58 using GIT_SSH to set credentials Github Jenkins Master
22:12:58 ERROR: Error cloning remote repo 'origin'
22:12:58 hudson.plugins.git.GitException: Failed to setup credentials
22:12:58    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1515)
22:12:58    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
22:12:58    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
22:12:58    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:512)
22:12:58    at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152)
22:12:58    at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145)
22:12:58    at hudson.remoting.UserRequest.perform(UserRequest.java:153)
22:12:58    at hudson.remoting.UserRequest.perform(UserRequest.java:50)

0 个答案:

没有答案
相关问题