没有在git jenkins中找到版本库 [英] Repository not found in git jenkins

查看:925
本文介绍了没有在git jenkins中找到版本库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我使用安装了最新插件的jenkins 2.64。

我试图在jenkins中设置git repo并给出凭证,但是给出的错误未能将存储库与状态码128连接起来。

 克隆存储库https://github.com/somerepository.git 
> git init /Users/kumar/.jenkins/workspace/sample#timeout = 10
从https://github.com/somerepository.git获取上游更改
> git --version#timeout = 10
使用GIT_ASKPASS设置凭证
> git fetch --tags --progress https://github.com/somerepository.git + refs / heads / *:refs / remotes / origin / *
错误:克隆远程回购'origin'错误
hudson.plugins.git.GitException:命令git fetch --tags --progress https://github.com/somerepository.git + refs / heads / *:refs / remotes / origin / *返回状态码128:
stdout:
stderr:remote:找不到存储库。
fatal:repository'https://github.com/somerepository.git/'not found

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1903)在org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials
(CliGitAPIImpl.java:1622)
。在org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access $ 300(CliGitAPIImpl.java:71)
。在org.jenkinsci.plugins.gitclient.CliGitAPIImpl $ 1.execute(CliGitAPIImpl.java:348)$ b $在org.jenkinsci.plugins.gitclient.CliGitAPIImpl $ 2.execute(CliGitAPIImpl.java:545)
b在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)美元,hudson.model.AbstractProject.checkout(AbstractProject.java:1212 b $ b)
在hudson.model.AbstractBuild $ AbstractBuildExecution.defaultCheckout(AbstractBuild.java:560)
在jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckou tStrategy.java:86)
at hudson.model.AbstractBuild $ AbstractBuildExecution.run(AbstractBuild.java:485)
at hudson.model.Run.execute(Run.java:1735)
在hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
在hudson.model.ResourceController.execute(ResourceController.java:97)
在hudson.model.Executor.run(Executor.java :415)
错误:空
完成:FAILURE

任何人都可以帮忙吗?

注意:对于之前版本的jenkins,在管理jenkins-> configure中有git部分,配置我们可以放置git可执行文件的位置。但没有在新版本的jenkins中找到git section。



编辑:添加日志

解决方案

Hi试试让你的Jenkins成为ssh无钥匙。它的失败,因为它无法取得你的密码进入混帐。
它无法获得回购。



用于jenkins上的ssh-keygen在您登录后作为su - jenkins



复制密钥ssh-rsa.pub并将其粘贴到企业github设置中



有一个ssh密钥添加选项



粘贴这个发布密钥。



为git存储库url和凭证单击none并指定您的git分支在分支节中被拉动。 / p>

I am using the jenkins 2.64 with installed latest plugins.

I am trying to set the git repo in jenkins and given credentials, but giving the error failed to connect repository with status code 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

Can anybody helpout?

Note : for previous versions of jenkins has git section in manage jenkins-> configure where we can place our git executable. but didn't find git section in new version of jenkins.

edit: added log

解决方案

Hi Try to make your Jenkins as ssh keyless. Its failure as its unable to fetch your password to enter git. Its failing to pull the repo.

for ssh-keygen on jenkins after you login as su - jenkins

copy the key ssh-rsa.pub and paste it in enterprise github setting

there is an option for ssh key add

paste this publish key.

Give the git repository url and in credentials click none and specify your git branch to be pulled in branch section.

这篇关于没有在git jenkins中找到版本库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆