2016-08-25 95 views
2

我在嘗試連接到通過https託管的repo時使用jenkins git插件時遇到問題。Jenkins git插件:Peer的證書頒發者不被識別

Baue in Arbeitsbereich /opt/jenkins/jobs/TestJob2/workspace 
> git rev-parse --is-inside-work-tree # timeout=10 
Fetching changes from the remote Git repository 
> git config remote.origin.url https://my.host.de/group/project # timeout=10 
Fetching upstream changes from https://my.host.de/group/project 
> git --version # timeout=10 
using GIT_ASKPASS to set credentials Jenkins at my.host.de 
> git fetch --tags --progress https://my.host.de/group/project +refs/heads/*:refs/remotes/origin/* 
ERROR: Error fetching remote repo 'origin' 
hudson.plugins.git.GitException: Failed to fetch from https://my.host.de/group/project 
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:766) 
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1022) 
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1053) 
    at hudson.scm.SCM.checkout(SCM.java:485) 
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1269) 
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607) 
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) 
    at hudson.model.Run.execute(Run.java:1738) 
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 
    at hudson.model.ResourceController.execute(ResourceController.java:98) 
    at hudson.model.Executor.run(Executor.java:410) 
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://my.host.de/group/project +refs/heads/*:refs/remotes/origin/*" returned status code 128: 
stdout: 
stderr: fatal: unable to access 'https://my.host.de/group/project/': Peer's Certificate issuer is not recognized. 

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1709) 
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1438) 
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:63) 
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:314) 
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:764) 
    ... 11 more 
ERROR: null 
Finished: FAILURE 

我無法使用SSH。 證書沒問題,一切看起來都很棒。

curl -Lv不顯示任何錯誤。

我可以通過ssh登錄時克隆本地機器本地存儲庫,也沒有錯誤消息。

我必須更換哪個開關?

我可以改變這種行爲時,設置git屬性http.sslVerify爲false用戶jenkins正在運行,但這只是一個解決方法。

回答

2

我剛剛花了一個小時來研究這個問題。我測試的是,對於主設備,一切都很好,自定義CA被配置到系統中。我花了不少時間才意識到,所有的奴隸需要安裝適當的gitconfig或CA證書才能正常工作。

+1

我不記得是什麼幫助我的情況,但你的答案看起來是合法的;) – Zarathustra

相關問題