git cloning behind proxy — different behavior, same command

房东的猫 提交于 2019-12-08 07:00:26

问题


I researched for this problem but didn't find anything helpful. What I don't understand is that the error keeps changing. I am trying to clone a repository using

git clone http://git.osmocom.org/gr-osmosdr gr-osmosdr

and I get two different errors at different times:

  1. Complains too many open files. (error: unable to ope object pack directory. fatal: failed to read object XXXXXXX: too many open files)
  2. couldn't connect to proxy (couldn't connect proxy at mycompanyproxy (curl_result=7, http_code=0, sha1 = YYYYYYYY)

I did set the environment variable

http_proxy="mycompanyproxy:1080"

and

git config --global http.proxy mycompanyproxy:1080

I did verify values of the variables too.

Any help is appreciated.


回答1:


Try setting only environment variable or git config settings.

you can see both approaches set in "Only use a proxy for certain git urls/domains?"

set http_proxy=http://username:password@proxydomain:port
set https_proxy=http://username:password@proxydomain:port

Make sure to not use quotes, and don't forget the no_proxy one:

set no_proxy=localhost,.my.company 


来源:https://stackoverflow.com/questions/21918250/git-cloning-behind-proxy-different-behavior-same-command

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!