1.7.10 can't resolve proxy 'null' for https

1,432 views
Skip to first unread message

Jon

unread,
Apr 10, 2012, 12:18:17 PM4/10/12
to msy...@googlegroups.com
On Win7 32bit, just extracted the portable version into my c:\Apps\git dir (C:\Apps\git\cmd is on PATH) and ran into an issue that didn't exist for me with 1.7.9.  There's never been a proxy at this location, but I'm double checking to see if that has changed. Let me know what other additional info you may need or other tests I can run for you.

C:\Users\Jon\Documents\RubyDev\ruby-git>git --version
git version 1.7.10.msysgit.1

C:\Users\Jon\Documents\RubyDev\ruby-git>git remote -v
codeshop        g...@github.com:thecodeshop/ruby.git (fetch)
codeshop        g...@github.com:thecodeshop/ruby.git (push)
origin  https://github.com/ruby/ruby.git (fetch)
origin  https://github.com/ruby/ruby.git (push)

C:\Users\Jon\Documents\RubyDev\ruby-git>git fetch
error: Couldn't resolve proxy '(null)' while accessing https://github.com/ruby/ruby.git/info/refs
fatal: HTTP request failed

C:\Users\Jon\Documents\RubyDev\ruby-git>git fetch origin
error: Couldn't resolve proxy '(null)' while accessing https://github.com/ruby/ruby.git/info/refs
fatal: HTTP request failed

C:\Users\Jon\Documents\RubyDev\ruby-git>git fetch codeshop

Pat Thoyts

unread,
Apr 10, 2012, 12:48:05 PM4/10/12
to Jon, msy...@googlegroups.com

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.

Jon

unread,
Apr 10, 2012, 12:59:46 PM4/10/12
to msy...@googlegroups.com, Pat Thoyts

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

Robert

unread,
May 11, 2012, 4:57:18 AM5/11/12
to msysGit
I sure didn't put it there, but experienced the same issue.
Thanks for posting the answer.

On Apr 10, 6:59 pm, Jon <jon.for...@gmail.com> wrote:
> > On 10 April 2012 17:18, Jon <jon.for...@gmail.com> wrote:
> > > On Win7 32bit, just extracted the portable version into my c:\Apps\git dir
> > > (C:\Apps\git\cmd is on PATH) and ran into an issue that didn't exist for me
> > > with 1.7.9.  There's never been aproxyat this location, but I'm double
> > > checking to see if that has changed. Let me know what other additional info
> > > you may need or other tests I can run for you.
>
> > > C:\Users\Jon\Documents\RubyDev\ruby-git>git --version
> > > git version 1.7.10.msysgit.1
>
> > > C:\Users\Jon\Documents\RubyDev\ruby-git>git remote -v
> > > codeshop        g...@github.com:thecodeshop/ruby.git (fetch)
> > > codeshop        g...@github.com:thecodeshop/ruby.git (push)
> > > origin https://github.com/ruby/ruby.git(fetch)
> > > origin https://github.com/ruby/ruby.git(push)
>
> > > C:\Users\Jon\Documents\RubyDev\ruby-git>git fetch
> > > error:Couldn'tresolveproxy'(null)'whileaccessing
> > >https://github.com/ruby/ruby.git/info/refs
> > > fatal: HTTP request failed
>
> > > C:\Users\Jon\Documents\RubyDev\ruby-git>git fetch origin
> > > error:Couldn'tresolveproxy'(null)'whileaccessing
> > >https://github.com/ruby/ruby.git/info/refs
> > > fatal: HTTP request failed
>
> > > C:\Users\Jon\Documents\RubyDev\ruby-git>git fetch codeshop
>
> > I just tried this and 'git ls-remotehttps://...'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-remotehttps://github.com/ruby/ruby.git
> > error:Couldn'tresolveproxy'(null)'whileaccessing
> >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.
>
> 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
> >proxysetting. Possibly there is something in some git config file if

dha...@invino.com

unread,
May 14, 2012, 1:55:22 AM5/14/12
to msy...@googlegroups.com

You just have to unset http.proxy and possibly https.proxy!

git config --global --unset http.proxy

Alex

unread,
May 30, 2012, 11:46:23 AM5/30/12
to msysGit
>> git config --global --unset http.proxy
Thank you for the answer!

Alex

On May 14, 1:55 am, dha...@invino.com wrote:
> You just have to unset http.proxy and possibly https.proxy!
>
>
>
>
>
>
>
>
>

Johannes Schindelin

unread,
May 30, 2012, 3:34:30 PM5/30/12
to Alex, msysGit
Hi Alex,

On Wed, 30 May 2012, Alex wrote:

> >> git config --global --unset http.proxy
> Thank you for the answer!

For fun, you could try to find out where http.proxy is parsed and add an
explicit check for a non-NUL value (i.e. if (*value) blub = value).

Such a contribution (preferably as a patch to this mailing list or a
GitHub pull request) would be highly appreciated,
Johannes
Reply all
Reply to author
Forward
0 new messages