首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >错误:在Jenkins运行自动化测试时获取远程回购“源”的错误

错误:在Jenkins运行自动化测试时获取远程回购“源”的错误
EN

Stack Overflow用户
提问于 2022-05-23 09:16:52
回答 1查看 1K关注 0票数 0

我对吉特和詹金斯很陌生。

我试图从Jenkins运行我的自动化项目,当我单击“立即构建”时,我得到的错误是" error : Error提取远程回购‘原产地’“。我尝试在Manage Jenkins>Global Tool Configuration > path to git executable中将Git路径设置为“C:\ProgramFiles\Git\gitrepo\bin\git.exe”。但还是没有运气。

下面是我在控制台输出中遇到的完全错误。

代码语言:javascript
运行
复制
Started by user Test User
Running as SYSTEM
    Building in workspace C:\Users\XXXXX\.jenkins\workspace\automationtestsuit
    The recommended git tool is: NONE
    using credential 5674657456745645645647jdgfhdgfhd
     - C:\Program Files\Git\gitrepo\bin\git.exe rev-parse --resolve-git-dir C:\Users\XXXXXX\.jenkins\workspace\automationtestsuit\.git # timeout=10
    Fetching changes from the remote Git repository
     - C:\Program Files\Git\gitrepo\bin\git.exe config remote.origin.url https://github.com/yyyy/zzzzzz/tree/master/autotest # timeout=10
    Fetching upstream changes from https://github.com/yyyy/zzzzzz/tree/master/autotest
     - C:\Program Files\Git\gitrepo\bin\git.exe --version # timeout=10
     - git --version # 'git version 2.24.1.windows.2'
    using GIT_ASKPASS to set credentials 
     - C:\Program Files\Git\gitrepo\bin\git.exe fetch --tags --force --progress -- https://github.com/yyyy/zzzzzz/tree/master/autotest +refs/heads/*:refs/remotes/origin/* # timeout=10
    ERROR: Error fetching remote repo 'origin'
    hudson.plugins.git.GitException: Failed to fetch from https://github.com/yyyy/zzzzzz/tree/master/autotest
        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:1003)
        at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1244)
        at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1308)
        at hudson.scm.SCM.checkout(SCM.java:540)
        at hudson.model.AbstractProject.checkout(AbstractProject.java:1217)
        at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:647)
        at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:85)
        at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:519)
        at hudson.model.Run.execute(Run.java:1897)
        at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
        at hudson.model.ResourceController.execute(ResourceController.java:101)
        at hudson.model.Executor.run(Executor.java:442)
    Caused by: hudson.plugins.git.GitException: Command "C:\Program Files\Git\gitrepo\bin\git.exe fetch --tags --force --progress -- https://github.com/yyyy/zzzzzz/tree/master/autotest +refs/heads/*:refs/remotes/origin/*" returned status code 128:
    stdout: 
    stderr: fatal: repository 'https://github.com/yyyy/zzzzzz/tree/master/autotest/' not found
        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2671)
        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2096)
        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:84)
        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:618)
        at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:1001)
        ... 11 more
    ERROR: Error fetching remote repo 'origin'
TestNG Reports Processing: START
Looking for TestNG results report in workspace using pattern: **/testng-results.xml
Did not find any matching files.
Finished: FAILURE*
EN

回答 1

Stack Overflow用户

发布于 2022-05-23 18:42:58

请注意stderr行:

stderr:致命的:未找到存储库'https://github.com/yyyy/zzzzzz/tree/master/autotest/

您对存储库使用了错误的URL!GitHub URL由方案、主机名github.com、用户名(此处为yyyy)、一个斜杠和存储库名称(zzzzzz)组成,然后停止。/tree/master/autotest部分绝对是错误的。我猜想您替换了用户和存储库的名称,但是如果没有,yyyy/zzzzzz可能也是错误的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72346050

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档