日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

github private链接访问_如何将Jenkins链接到私有Github存储库?

發布時間:2024/9/27 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 github private链接访问_如何将Jenkins链接到私有Github存储库? 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

我的目標是將私有Github存儲庫拉到Jenkins .

以下是一些背景:

MacOS

Jenkins在本地托管, localhost:8080

在Jenkins中安裝了Git插件和Github插件 .

如果我將存儲庫轉為Public,Jenkins的一切都很好 .

從命令行,我可以使用我在Jenkins中使用的相同憑據來執行"git clone"私有倉庫 .

但是當我把它變成私人并將它用作詹金斯的來源時,它就被打破了 .

錯誤是:

Building in workspace /Users/Shared/Jenkins/Home/jobs/TestFramework/workspace

> /usr/bin/git rev-parse --is-inside-work-tree # timeout=10

Fetching changes from the remote Git repository

> /usr/bin/git config remote.origin.url https://github.com/XXXXXXX/testframework.git # timeout=10

Fetching upstream changes from https://github.com/XXXXXXX/testframework.git

> /usr/bin/git --version # timeout=10

using GIT_ASKPASS to set credentials

> /usr/bin/git fetch --tags --progress https://github.com/XXXXXXX/testframework.git +refs/heads/*:refs/remotes/origin/* # timeout=5

ERROR: Timeout after 5 minutes

ERROR: Error fetching remote repo 'origin'

hudson.plugins.git.GitException: Failed to fetch from https://github.com/XXXXXXX/testframework.git

at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:806)

at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1070)

at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1101)

at hudson.scm.SCM.checkout(SCM.java:496)

at hudson.model.AbstractProject.checkout(AbstractProject.java:1278)

at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)

at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)

at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)

at hudson.model.Run.execute(Run.java:1728)

at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)

at hudson.model.ResourceController.execute(ResourceController.java:98)

at hudson.model.Executor.run(Executor.java:405)

Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git fetch --tags --progress https://github.com/XXXXXXX/testframework.git +refs/heads/*:refs/remotes/origin/*" returned status code 143:

I tried a few suggestions online:

ssh-keygen到/Users/shared/jenkins/.ssh/id_rsa

ssh-keygen到/Users/jason/.ssh/id_rsa

將相應的"id_rsa.pub"添加到私有存儲庫"Settings" => "Deploy keys" .

但仍然沒有工作 .

總結

以上是生活随笔為你收集整理的github private链接访问_如何将Jenkins链接到私有Github存储库?的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。