2017-06-13 164 views
2

enter image description here在git jenkins中找不到存储库

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

我想设置在詹金斯并给予凭据混帐回购协议,但给人的错误,无法存储库状态码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-> configure中有git部分,我们可以在其中放置我们的git可执行文件。但在新版本的jenkins中没有找到git部分。

编辑:添加日志

+1

看到https://stackoverflow.com/questions/16721629/jenkins-returned-status-code-128-with-github – user7294900

+0

你确定你有权利与该用户在git回购?如果'是',请尝试在本地计算机上通过命令提示符调用'git ls-remote -h https:// github ....'。我的问题是,即使我试图通过一个拥有权限的帐户访问git,詹金斯也试图与另一个没有权限的帐户连接。 –

回答

0

Fetching upstream changes from https://github.com/somerepository.git 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.

通常HTTPS URL的git将不会在年底 git的。请确认您的网址。 我想你正试图访问一个ssh url。

+0

是的..你说的是正确的https git URL不会有.git。我最初尝试没有.git,但结果是一样的。不,我没有尝试任何ssh网址..我能够在git命令行克隆https网址。 –

+0

然后它是不适用的问题。您可能必须与您的N/W小组讨论存储库域的IP是否阻塞。如果你想确认 - 在jenkins中添加一个简单的shell脚本(bash脚本)并执行你在你的机器命令提示符下执行的相同命令(git clone) – smilyface

0

嗨试着让你的詹金斯ssh无钥匙。它的失败,因为它无法取得你的密码进入混帐。 它没有拉回购。

对詹金斯的ssh - 凯基你登录,之后su - 詹金斯

复制的关键ssh-rsa.pub并粘贴在企业github上设置

存在对SSH密钥选项添加

粘贴这个发布键。

给git仓库url和凭据单击none并指定你的git分支被拉到分支节中。

相关问题