2017-02-23 88 views
0

從gitHub存儲庫爲poc嘗試Jenkins版本的項目時,出現以下錯誤。詹金斯是本地安裝,我使用https地址作爲git,用戶名和密碼用於登錄到GitHub。任何人都可以給我一些指點這裏,因爲我是新來的都詹金斯和GitHub的Jenkins Git Plugin

Building in workspace C:\Program Files (x86)\Jenkins\workspace\AdventureWorks2014 - 1. Build 
 
Cloning the remote Git repository 
 
Cloning repository https://github.com/h020905a/AdventureWorks2014.git 
 
> git.exe init C:\Program Files (x86)\Jenkins\workspace\AdventureWorks2014 - 1. Build # timeout=10 
 
Fetching upstream changes from https://github.com/h020905a/AdventureWorks2014.git 
 
> git.exe --version # timeout=10 
 
using GIT_ASKPASS to set credentials 
 
> git.exe fetch --tags --progress https://github.com/h020905a/AdventureWorks2014.git +refs/heads/*:refs/remotes/origin/* 
 
ERROR: Error cloning remote repo 'origin' 
 
hudson.plugins.git.GitException: Error performing git command 
 
\t at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1793) 
 
\t at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1513) 
 
\t at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64) 
 
\t at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315) 
 
\t at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:512) 
 
\t at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1057) 
 
\t at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1097) 
 
\t at hudson.scm.SCM.checkout(SCM.java:495) 
 
\t at hudson.model.AbstractProject.checkout(AbstractProject.java:1278) 
 
\t at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604) 
 
\t at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 
 
\t at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) 
 
\t at hudson.model.Run.execute(Run.java:1728) 
 
\t at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 
 
\t at hudson.model.ResourceController.execute(ResourceController.java:98) 
 
\t at hudson.model.Executor.run(Executor.java:404) 
 
Caused by: org.jvnet.winp.WinpException: Failed to read RT_USER_PROCESS_PARAMETERS error=299 at envvar-cmdline.cpp:151 
 
\t at org.jvnet.winp.Native.getCmdLineAndEnvVars(Native Method) 
 
\t at org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:126) 
 
\t at org.jvnet.winp.WinProcess.getCommandLine(WinProcess.java:102) 
 
\t at hudson.util.ProcessTree$Windows$1.getArguments(ProcessTree.java:444) 
 
\t at hudson.plugins.msbuild.MsBuildKillingVeto.vetoProcessKilling(MsBuildKillingVeto.java:56) 
 
\t at hudson.util.ProcessTree$OSProcess.getVeto(ProcessTree.java:242) 
 
\t at hudson.util.ProcessTree$Windows$1.killRecursively(ProcessTree.java:425) 
 
\t at hudson.util.ProcessTree.killAll(ProcessTree.java:145) 
 
\t at hudson.Proc$LocalProc.destroy(Proc.java:380) 
 
\t at hudson.Proc$LocalProc.join(Proc.java:353) 
 
\t at hudson.Proc.joinWithTimeout(Proc.java:166) 
 
\t at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1780) 
 
\t ... 15 more 
 
ERROR: null 
 
Finished: FAILURE

回答

0

如果你的GitHub的登錄密碼包含特殊字符,那麼你所面臨的問題可能是類似問題描述在這張票: https://issues.jenkins-ci.org/browse/JENKINS-38655

你可以嘗試讓你的工作使用JGit。如果您不使用TFS,但在特定用戶的密碼中有特殊字符(如插入符號或符號或單引號或雙引號),則可以使用此標記可能是JENKINS-38194的副本,這種情況下的解決方法可能是將該作業從使用命令行git實現切換到使用JGit實現.JGit實現需要先從「Manage Jenkins」,「全局工具配置「,」Git「,那麼每個作業都會有一個選擇列表,讓您選擇該作業是否應該使用命令行git或JGit。」

0

通過將github中的分支切換爲主並使公共回購解決了該問題。