我对吉特和詹金斯很陌生。
我试图从Jenkins运行我的自动化项目,当我单击“立即构建”时,我得到的错误是" error : Error提取远程回购‘原产地’“。我尝试在Manage Jenkins>Global Tool Configuration > path to git executable中将Git路径设置为“C:\ProgramFiles\Git\gitrepo\bin\git.exe”。但还是没有运气。
下面是我在控制台输出中遇到的完全错误。
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*
发布于 2022-05-23 10:42:58
请注意stderr
行:
stderr:致命的:未找到存储库'https://github.com/yyyy/zzzzzz/tree/master/autotest/‘
您对存储库使用了错误的URL!GitHub URL由方案、主机名github.com
、用户名(此处为yyyy
)、一个斜杠和存储库名称(zzzzzz
)组成,然后停止。/tree/master/autotest
部分绝对是错误的。我猜想您替换了用户和存储库的名称,但是如果没有,yyyy/zzzzzz
可能也是错误的。
https://stackoverflow.com/questions/72346050
复制相似问题