我正在使用安装了最新插件的jenkins 2.64。
我正在尝试在jenkins中设置git repo并给出凭据,但是错误导致无法使用状态码128连接存储库。
Cloning repository https://github.com/somerepository.git
> git init /Users/kumar/.jenkins/workspace/sample # timeout=10
Fetching upstream changes from https://github.com/somerepository.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials
> git fetch --tags --progress https://github.com/somerepository.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "git fetch --tags --progress https://github.com/somerepository.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: remote: Repository not found.
fatal: repository 'https://github.com/somerepository.git/' not found
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1903)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1622)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:348)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:545)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1067)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1107)
at hudson.scm.SCM.checkout(SCM.java:495)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1212)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:560)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:485)
at hudson.model.Run.execute(Run.java:1735)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:415)
ERROR: null
Finished: FAILURE
有人可以提供帮助吗?
注意:对于以前版本的jenkins,在管理jenkins中有git部分 - >配置我们可以放置git可执行文件的位置。但是在新版本的詹金斯中找不到git部分。
编辑:添加日志
答案 0 :(得分:0)
从
https://github.com/somerepository.git
获取上游更改 错误:克隆远程repo'origin'时出错 hudson.plugins.git.GitException:命令“git fetch --tags --progresshttps://github.com/somerepository.git
+ refs / heads / :refs / remotes / origin / “返回状态码128:stdout:stderr:remote:未找到存储库。
通常https git URL最后不会有.git 。请确认您的网址。 我猜您正在尝试访问ssh网址。
答案 1 :(得分:0)
嗨试着让你的Jenkins成为ssh无钥匙。它失败,因为它无法获取您输入git的密码。 它未能撤回回购。
在以su - jenkins 登录后,对于jenkins上的ssh-keygen
复制密钥ssh-rsa.pub并将其粘贴到企业github设置
中有一个ssh key add选项
粘贴此发布密钥。
给git存储库url并在凭据中单击none并指定要在分支部分中提取的git分支。
答案 2 :(得分:0)
这仅表示您的用户ID无效。也许它已被暂停,也许它不再处于活动状态。返回到Jenkins作业页面,然后单击配置。选择一个有效的ID并保存更改。无论如何,您应该使用服务帐户,而不是个人帐户。
如果您必须使用已经存在的帐户,请转到您的运营/管理人员那里,并获取恢复的ID。