当前位置: 首页 > 面试题库 >

Jenkins执行git命令时出错

严阳秋
2023-03-14
问题内容

尝试构建时出现以下错误:

Building in workspace F:\BuildSource\SeleniumHTTPMonitoring
 > F:\soft\Git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > F:\soft\Git\bin\git.exe config remote.origin.url https://bitbucket.mycompany.io/scm/oi/seleniumhttpmonitoring.git # timeout=10
Fetching upstream changes from https://bitbucket.mycompany.io/scm/oi/seleniumhttpmonitoring.git
 > F:\soft\Git\bin\git.exe --version # timeout=10
using .gitcredentials to set credentials
 > F:\soft\Git\bin\git.exe config --local credential.username master.builder # timeout=10
 > F:\soft\Git\bin\git.exe config --local credential.helper store --file=\"C:\Windows\TEMP\git1527457549107748901.credentials\" # timeout=10
 > F:\soft\Git\bin\git.exe -c core.askpass=true fetch --tags --progress https://bitbucket.mycompany.io/scm/oi/seleniumhttpmonitoring.git +refs/heads/*:refs/remotes/origin/*

 > F:\soft\Git\bin\git.exe config --local --remove-section credential # timeout=10
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://bitbucket.mycompany.io/scm/oi/seleniumhttpmonitoring.git
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:799)
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1055)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1086)
    at hudson.scm.SCM.checkout(SCM.java:485)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
    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:1741)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:410)
Caused by: hudson.plugins.git.GitException: Error performing git command
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1751)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1476)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:63)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:314)
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:797)
    ... 11 more
Caused by: org.jvnet.winp.WinpException: Failed to read environment variable table error=299 at .\envvar-cmdline.cpp:201
    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:441)
    at hudson.plugins.msbuild.MsBuildKillingVeto.vetoProcessKilling(MsBuildKillingVeto.java:55)
    at hudson.util.ProcessTree$OSProcess.getVeto(ProcessTree.java:239)
    at hudson.util.ProcessTree$Windows$1.killRecursively(ProcessTree.java:422)
    at hudson.util.ProcessTree.killAll(ProcessTree.java:142)
    at hudson.Proc$LocalProc.destroy(Proc.java:375)
    at hudson.Proc$LocalProc.join(Proc.java:348)
    at hudson.Proc.joinWithTimeout(Proc.java:164)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1736)
    ... 15 more
ERROR: null

Jenkins 2.7.1在Windows Server 2012 R2上运行(在Jenkins
2.7.4上发生了相同的错误)。我可以通过git命令行克隆仓库,没有任何问题。发生这种情况时,我可以在任务管理器屏幕快照中看到多个git进程树,如果我稍等片刻,我会在Jenkins中看到它。


问题答案:

罪魁祸首是Git插件。更新后开始工作。我正在使用2.5.3版本。



 类似资料:
  • 我在执行命令时出错

  • 我正在我的电脑上运行Jenkins作为Windows服务。我正在努力学习使用它。对于虚拟作业,构建步骤之一是使用以下命令执行Windows批处理命令 当我在Jenkins上构建作业时,我得到一个构建错误,即JLink不被识别为内部或外部命令、可操作程序或批处理文件。当我从命令提示符下运行命令时,它运行起来没有任何问题。Windows路径已设置为安装JLink的路径。我应该在Jenkins中另外配置

  • 我正在执行命令“cordova build”(完成以上设置后,举例说明了此链接Phonegap的命令行界面)。 但note.js返回以下错误: 从“android”平台的默认值生成config.xml 准备android项目 通过命令“cmd”/C C:\net\phoneGap\hello\platforms\android\cordova\BUILD 错误:生成android项目时出错。执行“

  • 问题内容: 我正在尝试将C#硒自动化与Jenkins集成在一起。我安装了jenkins,并且可以在Chrome上以管理员身份启动jenkins。但是我在命令提示符下运行此命令时看到以下问题 我当前正在使用:Windows 10,jdk1.8.0_151,Jenkins 2.94我正在这里复制完整错误。 我不确定为什么“ java -jar jenkins.war”命令抛出错误。 我遵循了这一点:执

  • 但当我从詹金斯的工作中运行它时,它不在那里 path=/usr/local/sbin://usr/local/bin://usr/sbin://usr/bin://sbin://usr/games://usr/local/games_=/usr/bin/

  • 我正在尝试执行来自Jenkins窗口批处理命令的以下命令 但每次失败并给出错误:“csslint不被识别为内部或外部命令、可操作程序或批处理文件。” 我已经正确设置了Nodejs路径,并且成功地从命令提示符执行了上述命令。 有人能帮我吗?