【Devops】【docker】【CI/CD】jenkins源碼管理,添加SSH地址后報錯+Jenkins構建報錯:Please make sure you have the correct access rights and the repository exists.


 

jenkins源碼管理,添加SSH地址后報錯:

  Could not read from remote repository.

  Please make sure you have the correct access rights and the repository exists.

 

有的在使用SSH地址,在jenkins上拉取Gitlab上的項目,可能會報錯:

這是剛添加完gitlab地址,就報的錯。

 

也有可能此時沒有報錯,但是在進行jenkins構建的時候,報錯:

Started by GitLab push by AngelSXD
Started by GitLab push by AngelSXD
Building in workspace /var/jenkins_home/workspace/swapping
using credential 798371b9-6a3d-44bf-b752-713db6a9920a
Cloning the remote Git repository
Cloning repository git@192.168.92.130:8090/root/swapping.git
 > /usr/bin/git init /var/jenkins_home/workspace/swapping # timeout=10
Fetching upstream changes from git@192.168.92.130:8090/root/swapping.git
 > /usr/bin/git --version # timeout=10
using GIT_SSH to set credentials 
 > /usr/bin/git fetch --tags --progress git@192.168.92.130:8090/root/swapping.git +refs/heads/*:refs/remotes/origin/*
ERROR: Timeout after 10 minutes
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "/usr/bin/git fetch --tags --progress git@192.168.92.130:8090/root/swapping.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: Terminated
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2042)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1761)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$400(CliGitAPIImpl.java:72)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:442)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:655)
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1152)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1192)
    at hudson.scm.SCM.checkout(SCM.java:504)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
    at hudson.model.Run.execute(Run.java:1810)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:429)
ERROR: Error cloning remote repo 'origin'
Finished: FAILURE
View Code

 

 

 

解決方法:

1.gitlab上拉取地址正確無誤

2.各個必要的插件都安裝成功

 

在確保了上面兩點都無誤的情況下,可以改用Http地址去clone項目!!!!!!!

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM