【问题标题】:Jenkins Git Plugin詹金斯 Git 插件
【发布时间】:2017-02-23 16:59:13
【问题描述】:

尝试从 GitHub 存储库为 poc 构建项目的 Jenkins 时出现以下错误。 Jenkins 是本地安装,我使用 git 的 https 地址以及我用来登录 GitHub 的 thge 用户名和密码。任何人都可以在这里给我一些建议,因为我是 Jenkins 和 GitHub 的新手

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
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1793)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1513)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:512)
	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1057)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1097)
	at hudson.scm.SCM.checkout(SCM.java:495)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1278)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
	at hudson.model.Run.execute(Run.java:1728)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	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
	at org.jvnet.winp.Native.getCmdLineAndEnvVars(Native Method)
	at org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:126)
	at org.jvnet.winp.WinProcess.getCommandLine(WinProcess.java:102)
	at hudson.util.ProcessTree$Windows$1.getArguments(ProcessTree.java:444)
	at hudson.plugins.msbuild.MsBuildKillingVeto.vetoProcessKilling(MsBuildKillingVeto.java:56)
	at hudson.util.ProcessTree$OSProcess.getVeto(ProcessTree.java:242)
	at hudson.util.ProcessTree$Windows$1.killRecursively(ProcessTree.java:425)
	at hudson.util.ProcessTree.killAll(ProcessTree.java:145)
	at hudson.Proc$LocalProc.destroy(Proc.java:380)
	at hudson.Proc$LocalProc.join(Proc.java:353)
	at hudson.Proc.joinWithTimeout(Proc.java:166)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1780)
	... 15 more
ERROR: null
Finished: FAILURE

【问题讨论】:

    标签: github jenkins jenkins-plugins


    【解决方案1】:

    如果您的 github 登录密码包含特殊字符,那么您面临的问题可能与此票证中描述的问题相似: https://issues.jenkins-ci.org/browse/JENKINS-38655

    您可以尝试让您的工作使用 JGit。引用上述票证中 Mark Waite 的回答:

    “如果您没有使用 TFS,但在特定用户的密码中有特殊字符(如插入符号或 & 符号或单引号或双引号),那么这可能是 JENKINS-38194 的副本。解决方法在这种情况下,可能是将该作业从使用命令行git实现切换到使用JGit实现。需要首先从“管理Jenkins”,“全局工具配置”,“Git”全局启用JGit实现,然后会有成为每个作业中的选择列表,允许您选择该作业是应该使用命令行 git 还是 JGit。"

    【讨论】:

      【解决方案2】:

      通过将 github 中的分支切换到 master 并公开 repo 解决了这个问题。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2013-11-05
        • 2015-05-11
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2022-11-22
        相关资源
        最近更新 更多