1

I am trying to clone some repo from GitHub, but I am getting error like:

fatal: unable to access 'https://github.com/some/thing.git/': Received HTTP code 403 from proxy after CONNECT

I am behind corporate proxy, but I set it already in .gitconfig.

This is inside my .gitconfig:

[http]
    proxy = http://something.com:80

[https]
    proxy = http://something.com:80

Do you have any idea?

Biffen
  • 6,249
  • 6
  • 28
  • 36
Kali26
  • 91
  • 1
  • 1
  • 9
  • 2
    I don't think https can be proxied to port 80. Try `proxy = https://something.com:443` instead? – evolutionxbox May 08 '19 at 09:13
  • @evolutionxbox Tried. Still the same response. – Kali26 May 08 '19 at 09:18
  • 1
    Consider having a look at https://stackoverflow.com/questions/783811/getting-git-to-work-with-a-proxy-server – evolutionxbox May 08 '19 at 09:21
  • https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403 so proxy has undestood request but refused to perform operation for some reason. Contact your IT department to get proper configuration and proxy limitation. – Marek R May 10 '23 at 15:08

1 Answers1

0

Does your proxy needs credentials? if yes, add your credentials in proxy URL. You can try using running this command in cmd.

git config --global https.proxy http://username:password@host:port

This command is going to update your .gitconfig file as below.

[http]
proxy = http://username:password@host:port

[https]
proxy = http://username:password@host:port
Chandan Kumar
  • 1,066
  • 10
  • 16