There are many posts saying to add the proxy credentials to the git config file.

Getting git to work with a proxy server

But I think this stores the username and password in clear text in the config file which is not great security plus is a (minor) hassle if your password is changed every 30 days.

How do other organisations get round this - do they host git repositories internally or do the more expensive subscriptions include a way around this? Or a separate proxy server that allows anonymous connections but restricted purely to GitHub IP addresses?


So, if you cover how proxy server authentication works from here:


You'd see that there are a couple of them which follow certain authorization types:

Here's a quick overview of what's in the link

Basic (see RFC 7617, base64-encoded credentials. See below for more information.),
Bearer (see RFC 6750, bearer tokens to access OAuth 2.0-protected resources),
Digest (see RFC 7616, only md5 hashing is supported in Firefox, see bug 472823 for SHA encryption support),
HOBA (see RFC 7486 (draft), HTTP Origin-Bound Authentication, digital-signature-based),
Mutual (see draft-ietf-httpauth-mutual),
AWS4-HMAC-SHA256 (see AWS docs).

So the config for authentication using Git over a proxy should be Basic which uses Plain-HTTP authentication so that's clear text, hence the purpose of Git using them non-encrypted.

I haven't seen any other use case for the other authentication schemes regarding Git in general. I'd really love to see an example but I haven't discovered such personally.

Since it's basic, then you'd just have to use it as such and update it over every password change cycle or use SSH to prevent using a password in the first place

  • Does the Git Credential Manager for Windows help at all? Or does it only store the GitHub credentials and not the AD enterprise ones? – ChipsLetten Sep 27 '18 at 13:21
  • I'm not too familiar with the GIT Credentials Manager on Windows but I do know you can prevent all this by using SSH credentials to access your git server. – Bakare Emmanuel Jan 2 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.