git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Bug: git behind proxy is broken in 2.34.1

From
Ttm-uzr3z@entrap.de <tm-uzr3z@entrap.de>
Date
Feb 16, 2023, 17:55 UTC
Message-ID
<c0862f86061c220af289ce812d57f9c7.squirrel@www.entrap.de>
Hi all,

I just realized that git cloning behind a webproxy is broken in version 2.34.1 (Ubuntu 22.04).

The environment bash variables http_proxy, https_proxy, HTTP_PROXY and HTTPS_PROXY are all set with the value "http://myusername:mypassword@ourwebproxy:3128/".

git gives me the following error message on cloning: $git clone https://github.com/XXXX/YYYY fatal: unable to access 'https://github.com/XXXX/YYYY/': Received HTTP code 407 from proxy after CONNECT

For example wget or curl http/https requests in the same shell work without any issues and use the same proxy settings from the environment variables.

In pcap traces I see that git requests the URL through the proxy, receives an http 407 authentication required, and repeats the same request again without credentials, which gets denied a second time.

On another very old machine with git 1.9.1 it requests the URL through the proxy, receives an http 407 authentication required, and repeats the request with credentials, which is allowed then.

Even with git config --global and --system variables http.proxy and https.proxy the authentication required reply is ignored.

The git configuration is all default, except the proxy variables. Hope this helps to reproduce and fix this issue. Thank you!

Best regards Holger

Next: Jeff King
Message 1 of 5 in “Bug: git behind proxy is broken in 2.34.1”
  1. tm-uzr3z@entrap.deFeb 16, 2023
  2. Jeff KingFeb 16, 2023
  3. add basic http proxy testsJeff King, Feb 16, 2023
  4. Junio C HamanoFeb 17, 2023
  5. Jeff KingFeb 17, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.