0

My git client is behind a company proxy. That proxy makes ssl interception.

I managed to suppress the SSL Certificate Problems with git config --global http.sslcainfo PATH-TO-PROXY-CA-CERT

Now I can clone repositories from github/bitbucket/gitlab/... over https (ssh is blocked)

But whenever I have to authenticate (e.g. for private repos or to push something) I get the message fatal: Authentication failed for ... sometimes also

remote: Anonymous access to ... denied.
fatal: Authentication failed for '...'

Why do I get these errors and what can I do to make it work?

Benedikt Bock
  • 1,007
  • 15
  • 37
  • Is a proxy in place which needs authentication? – MrTux Nov 30 '15 at 13:55
  • Yes. I use cntlm to make the authentication. The terminal itself is configured for the proxy. git has no http.proxy setting set. (setting it doesn't solve the problem) – Benedikt Bock Nov 30 '15 at 13:57

2 Answers2

1

Also note that while setting the proxy if your password has @ or any special character there will be an authentication problem. You need to escape that while setting the proxy.

If you are behind the corporate firewall and if all your requests goes through the proxy server then you must set the Git proxy first before running any get commands like pull, fetch and push commands.

To set the Git proxy for HTTP and HTTPS use the following Git commands in the git bash shell

git config --global http.proxy http://username:password@proxy.server.com:8080
git config --global https.proxy http://username:password@proxy.server.com:8080

//Replace username with your proxy username
//Replace password with your proxy password
//Replace proxy.server.com with the proxy domain URL.
//Replace 8080 with the proxy port no configured on the proxy server.

Check How to configure Git proxy and How to unset the Git Proxy for more details

0

Solution: In this case the company proxy removed the credentials for security reasons.

Benedikt Bock
  • 1,007
  • 15
  • 37