使用jenkins关闭私人回购时出现问题,错误:克隆远程回购时出错';原产地'; 我能够克隆公共回购,但面临使用詹金斯的私人回购的问题 我可以使用命令提示符克隆私有回购 我可以用乌龟git克隆私人回购协议 但不能用詹金斯克隆私人报告

使用jenkins关闭私人回购时出现问题,错误:克隆远程回购时出错';原产地'; 我能够克隆公共回购,但面临使用詹金斯的私人回购的问题 我可以使用命令提示符克隆私有回购 我可以用乌龟git克隆私人回购协议 但不能用詹金斯克隆私人报告,git,jenkins,github,Git,Jenkins,Github,詹金斯版本: 詹金斯2.263.4 git路径不能有问题。我已经经历了许多类似的问题,但没有一个答案能够解决这个问题 Wiping out workspace first. Cloning the remote Git repository Cloning repository https://github.com/user/module_name.git > C:\Program Files\Git\mingw64\bin\git.exe init C:\Workspace\works

詹金斯版本:

詹金斯2.263.4

git路径不能有问题。我已经经历了许多类似的问题,但没有一个答案能够解决这个问题

Wiping out workspace first.
Cloning the remote Git repository
Cloning repository https://github.com/user/module_name.git
 > C:\Program Files\Git\mingw64\bin\git.exe init C:\Workspace\workspace\Walky # timeout=10
Fetching upstream changes from https://github.com/user/module_name.git
 > C:\Program Files\Git\mingw64\bin\git.exe --version # timeout=10
 > git --version # 'git version 2.30.1.windows.1'
using GIT_ASKPASS to set credentials Vivek git credtials for jenkins Jenkins 
 > C:\Program Files\Git\mingw64\bin\git.exe fetch --tags --force --progress -- https://github.com/user/module_name.git +refs/heads/*:refs/remotes/origin/* # timeout=10
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "C:\Program Files\Git\mingw64\bin\git.exe fetch --tags --force --progress -- https://github.com/user/module_name.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: remote: Repository not found.
fatal: repository 'https://github.com/user/module_name.git/' not found

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2450)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2051)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:84)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:573)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:802)
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1221)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1299)
    at hudson.scm.SCM.checkout(SCM.java:505)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1206)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:637)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:509)
    at hudson.model.Run.execute(Run.java:1907)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:429)
ERROR: Error cloning remote repo 'origin'
Finished: FAILURE

首先检查Jenkins运行的帐户

在Windows上,它可以代替您自己的帐户

您可以通过Jenkins作业检查,执行一个简单的蝙蝠壳步骤:

git config --global -l --show-origin
您将看到全局Git配置的位置

如果它没有像您一样运行,Jenkins将无法从相同的Windows凭据管理器中获益,该管理器必须缓存远程存储库托管服务凭据(用户名/密码)。
这就是你找不到404的原因