Git is not working with proxy authentication


#1

Hi :slight_smile:
I am tring to install Discourse on CentOS 7, but launcher script prints

fatal: unable to access 'https://github.com/discourse/discourse_docker.git/': Received HTTP code 407 from proxy after CONNECT

I changed launcher script to know if proxy settings are passed correctly into docker and they work: I can use curl from inside Discourse docker container. But Git doesn’t work.

On CentOS I am using Git 2.18 with option
file:/root/.gitconfig http.proxyauthmethod=basic
After a couple of days I finally discovered that docker’s version of Git is 2.7.4, which simply doesn’t have this option (it first appears in 2.8.0).

With http.proxyauthmethod = anyauth Git from CentOS also can not work. To be honest, I don’t know why auto authentication is failing. With GIT_CURL_VERBOSE=1 I can see, that Git ignores the 1st “Proxy-Authenticate: Basic” header and don’t use user:pass which I provide in http[s]_proxy env variables (I tried .gitconfig proxy also and --volume it into the container).

I also ran alpine docker with Git installed, http.proxyauthmethod=basic set and it works.

Can you update Discourse docker’s Git at least to 2.8.0? Or give some advice how to configure Git?
Thank you very much!