運行我們正在利用我們的服務器上的內部證書時連接到HTTPS蠢貨,TFS 2017年,我已經跟着TFS生成代理未按照服務
的步驟以及步驟在這裏:
git version
git config --get remote.origin.url
git config gc.auto 0
git config --get-all http.https://ourtfsserver:8443/tfs/path/_git/project.extraheader
git config --get-all http.proxy
git -c http.extraheader="AUTHORIZATION: bearer ********" fetch --tags --prune --progress origin
fatal: unable to access 'https://ourtfsserver:8443/tfs/path/_git/project/': SSL certificate problem: unable to get local issuer certificate
##[error]Git fetch failed with exit code: 128
:
錯誤作爲服務運行時。
當同一代理配置運行,但使用\ run.cmd,而不是作爲一種服務(相同的憑據),它的工作原理成功:
git version
git config --get remote.origin.url
git config gc.auto 0
git config --get-all http.https://ourtfsserver:8443/tfs/path/_git/project.extraheader
git config --get-all http.proxy
git -c http.extraheader="AUTHORIZATION: bearer ********" fetch --tags --prune --progress origin
git checkout --progress --force {hash here}
(and continues onto next steps)
然而,當我嘗試手動使用我們生成代理運行如上所述,它給出與上述相同的Git fetch failed with exit code: 128
。雖然我可以使用這些憑據手動git clone
。
所以我已經試過:
git config –global http.sslVerify false
以及手動設置的配置文件中包括的變量。
我也安裝了證書使用IE來獲得它每個第二篇博客文章。
我可以手動拉下項目沒有問題爲好,既是我的帳戶,並使用git clone https://ourtfsserver:8443/tfs/path/_git/project c:\somefolder
我們生成代理帳戶我使用的是2017年TFS Update 1的RC2從2017年2月13日(https://www.visualstudio.com/en-us/news/releasenotes/tfs2017-update1)時,以前的版本不會讓我們的構建代理根本連接到tfs https。我們舊版的TFS 2015構建代理仍然有效,但缺少v2代理的新功能。
編輯:使用set HTTP_PROXY=https://localhost:8888
我能得到VSTS使用菲德勒作爲代理,並提出一個請求:
CONNECT our.local.tfs.fqdn:8443 HTTP/1.1
Host: our.local.tfs.fqdn:8443
User-Agent: git/2.10.0 (vsts-agent-git/2.112.0)
A SSLv3-compatible ClientHello handshake was found. Fiddler extracted the parameters below.
Version: 3.3 (TLS/1.2)
(bunch of other stuff it decrypted here)
用於驗證它有:
No Proxy-Authorization Header is present.
No Authorization Header is present.
您是否按照鏈接中的步驟重新啓動構建服務?和類似的問題在這裏:https://github.com/Microsoft/vsts-agent/issues/688 –
@ Eddie-MSFT是的我重新啓動整個服務器幾次試圖讓它工作:(是的,我看到之前的鏈接,並試圖做他們有同樣的事情,也是我最終在我的OP中的博客。我希望設置SSL_Verify爲false將工作,因爲它的內部我並不真正關心SSL太多,我們只啓用它,因爲構建代理首先需要使用PAT或其他auth類型 – John