Git – Received HTTP code 302 from proxy after CONNECT While cloning a bitbucket repository

bitbucketgitPROXY

I'm trying to clone a repo using proxy.

I've already configured git with:

git config --global https.proxy http:\\proxyuser:proxypass@proxy.name.edu.co:8080

But when I type:

git clone https://bitbucket.org/petsc/petsc petsc

It shows me the next error:

Cloning into 'pflotran-dev'… fatal: unable to access
'https://bitbucket.org/pflotran/pflotran-dev/': Received HTTP code 302
from proxy after CONNECT

I think I did it all right. I have no idea what is happening.
Thanks for helping.

Best Answer

It could be a syntax error:

  • A proxy with \ won't work: http:\\proxyuser...
  • A proxy with // should work: http://proxyuser...

So try:

git config --global http.proxy http://proxyuser:proxypass@proxy.name.edu.co:8080
git config --global https.proxy http://proxyuser:proxypass@proxy.name.edu.co:8080