【问题标题】:Can not download vcpkg by git无法通过 git 下载 vcpkg
【发布时间】:2020-01-15 19:28:44
【问题描述】:

当我使用git下载vcpkg时,提示Unsupported proxy syntax in':'

我在 powershell 上使用以下命令:

git clone https://github.com/microsoft/vcpkg.git

然后它返回:

fatal:unable to access 'https://github.com/microsoft/vcpkg.git': Unsupported proxy syntax in '<host>:<port>'

我的笔记本电脑不应该有任何代理设置,以及 git。 有谁知道如何解决这一问题?谢谢!

【问题讨论】:

  • set | grep -Fi _proxy? git config -l | grep -Fi _proxy?
  • 这些是对 git bash 的推荐吗?设置 | grep -Fi _proxy 返回 HTTPS_PROXY=':' HTTP_PROXY=':' no_proxy="'
  • git config -l | grep -Fi _proxy 返回错误:未知开关 '1' 用法:git config[]
  • 是的............
  • 它是小写 L (ell) 而不是 1 (one)。

标签: git powershell vcpkg


【解决方案1】:

您有环境变量HTTPS_PROXY='&lt;host&gt;:&lt;port&gt;'HTTP_PROXY='&lt;host&gt;:&lt;port&gt;'。如果您没有在当前终端中取消设置代理:

unset HTTP_PROXY HTTPS_PROXY

并从 shell 配置文件中删除。在~/.profile~/.bash_profile~/.bashrc 中搜索它们。

【讨论】:

  • 谢谢!一旦我找到它们并在环境变量中删除它们,终于可以工作了!
  • 但我不确定从哪里获取 shell 配置文件
  • ~ 表示$HOME
猜你喜欢
  • 2020-04-22
  • 1970-01-01
  • 2020-07-04
  • 2017-09-13
  • 1970-01-01
  • 1970-01-01
  • 2022-01-22
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多