运行我们正在利用我们的服务器上的内部证书时连接到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