【发布时间】:2018-01-18 10:02:29
【问题描述】:
我在使用带有 Git-Posh 的 PowerShell ISE 时遇到代理错误。
仅使用 GIT (Bash) 时,克隆就可以了。我必须将这些添加到 .gitconfig 文件中
[http]
proxy = http://localhost:1800
[https]
proxy = http://localhost:1800
但是,在 PowerShell ISE 脚本上使用 Git-posh 时出现异常:
1) 命令一生成此异常。
$resp = Invoke-WebRequest -Headers $headers -Uri ("{0}/_apis/git/repositories?api-version=1.0" -f $url)
$json = convertFrom-JSON $resp.Content
Invoke-WebRequest:需要代理授权 说明:访问此代理需要授权
2) 克隆会产生这个异常
git clone --mirror $url
致命:无法访问 'https://pn%fastCars.onmicrosoft.com:3kfokgwgwgwiigjiwjgjwigiiqegqegewrwghdasdasfggaffaa@fastCars.visualstudio.com/Ferrari/_git/FerrariF50-PerformanceTests/': 失败 连接到 localhost 端口 1800:连接被拒绝
有谁知道哪个命令可以扭转这种局面?
【问题讨论】:
标签: git powershell http proxy azure-devops