I just tried this and 'git ls-remote https://...' was ok using this
Portable git version. However, I can reproduce your issue with the
following:
C:\Temp>set https_proxy=http://
C:\Temp>git ls-remote https://github.com/ruby/ruby.git
error: Couldn't resolve proxy '(null)' while accessing
https://github.com/ruby/ruby.git/info/refs
fatal: HTTP request failed
You should check your environment for any http_proxy or https_proxy
variables. Executing 'set http' will show these for you in the cmd
prompt.
Also 'git var -l' may show any configuration that could affect the
proxy setting. Possibly there is something in some git config file if
it is not the environment.
Unsetting https_proxy would fix the above example.
C:\Users\Jon\Documents\RubyDev\ruby-git>set http
Environment variable http not defined
> Also 'git var -l' may show any configuration that could affect the
> proxy setting. Possibly there is something in some git config file if
> it is not the environment.
> Unsetting https_proxy would fix the above example.
C:\Users\Jon>git var -l | grep http
http.sslcainfo=/bin/curl-ca-bundle.crt
http.proxy=
The empty `http.proxy` was in my %USERPROFILE%\.gitconfig and seems to be the gremlin. I don't ever remember putting it there, but we all know that story ;)
Thank you!
Jon
You just have to unset http.proxy and possibly https.proxy!
git config --global --unset http.proxy