git lfs pull
会产生以下错误:
oobarbazanoo @ LAPTOP-CQEVT11F MINGW64 / c / Projects / doesnotmatter / ecom-oneapp-data-staging / ecom-oneapp-data-staging(主) $ git lfs pull
批处理响应:发布https://yaroslavvaltech@bitbucket.org/doesnotmatter/ecom-oneapp-data-staging.git/info/lfs/objects/batch:proxyconnect tcp:拨号tcp:查找helloInternet:没有这样的主机 批处理响应:发布https://yaroslavvaltech@bitbucket.org/doesnotmatter/ecom-oneapp-data-staging.git/info/lfs/objects/batch:proxyconnect tcp:拨号tcp:查找helloInternet:没有这样的主机 批处理响应:发布https://yaroslavvaltech@bitbucket.org/doesnotmatter/ecom-oneapp-data-staging.git/info/lfs/objects/batch:proxyconnect tcp:拨号tcp:查找helloInternet:没有这样的主机 批处理响应:发布https://yaroslavvaltech@bitbucket.org/doesnotmatter/ecom-oneapp-data-staging.git/info/lfs/objects/batch:proxyconnect tcp:拨号tcp:查找helloInternet:没有这样的主机 批处理响应:发布https://yaroslavvaltech@bitbucket.org/doesnotmatter/ecom-oneapp-data-staging.git/info/lfs/objects/batch:proxyconnect tcp:拨号tcp:查找helloInternet:没有这样的主机 批处理响应:发布https://yaroslavvaltech@bitbucket.org/doesnotmatter/ecom-oneapp-data-staging.git/info/lfs/objects/batch:proxyconnect tcp:拨号tcp:查找helloInternet:没有这样的主机 ...
看来问题出在代理配置错误。因此,我决定尝试运行命令git config --global --unset http.proxy
,然后再运行git lfs pull
。它没有帮助,我遇到了与上面相同的错误。
我正在使用Windows10。这是文件C:\Windows\System32\drivers\etc\hosts.file
的副本:
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
如您所见,其中没有指定helloInternet
主机。实际上,该文件完全空白,因为它仅包含注释。
我该如何解决?
因此,这是我的环境变量: enter image description here
删除http_proxy
变量并尝试使用命令后,一切正常。
答案 0 :(得分:0)
Go和处理代理的大多数其他工具都支持多个环境变量来控制所使用的代理。对于HTTP,这是http_proxy
环境变量,对于HTTPS,则同时查询http_proxy
和https_proxy
。
您的环境中似乎设置了其中一个或两个;取消设置它们可能有助于您直接连接到服务器。