git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: tm-uzr3z@entrap.de
To: git@vger.kernel.org
Subject: Bug: git behind proxy is broken in 2.34.1
Date: Thu, 16 Feb 2023 18:55:42 +0100	[thread overview]
Message-ID: <c0862f86061c220af289ce812d57f9c7.squirrel@www.entrap.de> (raw)

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


             reply	other threads:[~2023-02-16 18:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-16 17:55 tm-uzr3z [this message]
2023-02-16 20:46 ` Bug: git behind proxy is broken in 2.34.1 Jeff King
2023-02-16 20:56   ` [PATCH] add basic http proxy tests Jeff King
2023-02-17  0:30     ` Junio C Hamano
2023-02-17  0:43       ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c0862f86061c220af289ce812d57f9c7.squirrel@www.entrap.de \
    --to=tm-uzr3z@entrap.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).