2017-06-13 167 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分支被拉到分支節中。

相關問題