使用Git的企业代理Azure Devops [英] Corporate Proxy Azure Devops with Git

查看:83
本文介绍了使用Git的企业代理Azure Devops的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Azure Dev-Ops中创建了一个项目和存储库. 我们坐在公司代理的后面,并希望从该项目中克隆.

I've created a Project and Repo inside of Azure Dev-Ops. We are sitting behind a corporate proxy and would like to clone from this project.

我已将环境变量http_proxy,https_proxy,HTTP_PROXY,HTTPS_PROXY,git config --global https.proxy,git config --global http.proxy设置为以下匹配的http或https版本 http://domain \ username:password @ ProxAddr:Proxy 或者 https://domain \ username:password @ ProxAddr:Proxy

I have set the environment variables http_proxy,https_proxy, HTTP_PROXY,HTTPS_PROXY, git config --global https.proxy, git config --global http.proxy to the matching http or https version below http://domain\username:password@ProxAddr:Proxy or https://domain\username:password@ProxAddr:Proxy

当我运行git clone https://用户名:pwd @ dev.azure.com/username/ProjectName/_git/RepoName ,我收到以下错误.

When I run git clone https://username:pwd@dev.azure.com/username/ProjectName/_git/RepoName, I receive the error below.

Cloning into 'ProjectName'...
* Couldn't find host dev.azure.com in the .netrc file; using defaults
*   Trying {proxyip} ...
* Connected to {proxyip} ({proxyip}) port {proxyport} (#0)
* Establish HTTP proxy tunnel to dev.azure.com:443
> CONNECT dev.azure.com:443 HTTP/1.1
Host: dev.azure.com:443
User-Agent: git/2.7.4
Proxy-Connection: Keep-Alive

< HTTP/1.1 407 Proxy Authentication Required
< Proxy-Authenticate: NEGOTIATE
< Proxy-Authenticate: NTLM
< Proxy-Authenticate: BASIC realm="{CORPRELM}"
< Cache-Control: no-cache
< Pragma: no-cache
< Content-Type: text/html; charset=utf-8
< Proxy-Connection: close
< Connection: close
< Content-Length: 849
<
* Ignore 849 bytes of response-body
* Connect me again please
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt
* found 592 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* gnutls_handshake() failed: Error in the push function.
* Closing connection 0
* Couldn't find host dev.azure.com in the .netrc file; using defaults
* Hostname {proxyip} was found in DNS cache
*   Trying {proxyip}...
* Connected to {proxyip} ({proxyip}) port {proxyport}(#1)
* Establish HTTP proxy tunnel to dev.azure.com:443
> CONNECT dev.azure.com:443 HTTP/1.1
Host: dev.azure.com:443
User-Agent: git/2.7.4
Proxy-Connection: Keep-Alive

< HTTP/1.1 407 Proxy Authentication Required
< Proxy-Authenticate: NEGOTIATE
* gss_init_sec_context() failed: : SPNEGO cannot find mechanisms to negotiate
< Proxy-Authenticate: NTLM
< Proxy-Authenticate: BASIC realm="{CORPREALM}"
< Cache-Control: no-cache
< Pragma: no-cache
< Content-Type: text/html; charset=utf-8
< Proxy-Connection: close
< Connection: close
< Content-Length: 849
<
* Received HTTP code 407 from proxy after CONNECT
* Closing connection 1
fatal: unable to access 'https://username:devopspwdF@dev.azure.com/username/DevOpsProject/_git/DevOpsRepo/': gnutls_handshake() failed: Error in the push function.

错误似乎是这个?

< Proxy-Authenticate: NEGOTIATE
* gss_init_sec_context() failed: : SPNEGO cannot find mechanisms to negotiate

我需要明确声明某些内容吗?

Do I need to explicitly state something?

推荐答案

更新到新版本的git即可解决此问题.

Updating to a newer version of git resolves this.

这篇关于使用Git的企业代理Azure Devops的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆