简体   繁体   English

无法使用jenkins连接到Git /克隆Git存储库

[英]Unable to Connect to Git/Clone Git Repository using jenkins

I am trying to clone git repository using git plugin in jenkins but unable to clone. 我正在尝试使用jenkins中的git插件克隆git存储库,但无法克隆。 here is error log. 这是错误日志。

I am using git account to access my repository, "TEST" is a sample repository name. 我正在使用git帐户访问我的存储库,“ TEST”是示例存储库名称。

Started by user admin
Building in workspace C:\Program Files (x86)\Jenkins\workspace\EMR
 > git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git.exe config remote.origin.url (GIT REPOSITORY) # timeout=10
Fetching upstream changes from (GIT REPOSITORY)
 > git.exe --version # timeout=10
using GIT_ASKPASS to set credentials 
 > git.exe fetch --tags --progress (GIT REPOSITORY) +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from (GIT REPOSITORY)
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:809)
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1076)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1107)
    at hudson.scm.SCM.checkout(SCM.java:496)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1281)
    at `enter code here`hudson.model.Abstr`enter code here`actBuild$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:405)
Caused by: hudson.plugins.git.GitException: Command "git.exe fetch --tags --progress (GIT REPOSITORY) +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: 'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
error: unable to read askpass response from 'C:\Program Files (x86)\Jenkins\workspace\EMR@tmp\pass9041537171474807536.bat'
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No error

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1877)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1596)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:348)
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:807)
    ... 11 more
ERROR: null
Finished: FAILURE
I have updated Git version on my computer, problem mentioned above is resolved. But have following issue.

Started by user Administrator
Building in workspace C:\Jenkins\workspace\EMR
 > git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git.exe config remote.origin.url GitRepository # timeout=10
Fetching upstream changes from GitRepository 
 > git.exe --version # timeout=10
using GIT_ASKPASS to set credentials 
 > git.exe fetch --tags --progress GitRepository +refs/heads/*:refs/remotes/origin/*
ERROR: Timeout after 10 minutes
ERROR: Failed to join a process
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.kill(Proc.java:372)`enter code here`
    at hudson.Proc$1.run(Proc.java:159`enter code here`)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM