Strange git behaviour with git-bash on windows

Viewed 35

I am using this git version:

$ git --version
git version 2.32.0.windows.2

I have cloned a repo with http, with credentials. I am myself hosting the repo with gogs. Everything is working fine.

Suddently, git fetch / git pull / git fetch stops working, after days of using it without issues. I start getting authentication problems, intermittently. After much debugging, I setup a mitm reverse proxy. I then realize that sometimes git is not sending Authorization headers:

Authorization: Basic something-something-something

This happens even if I use the (insecure) configuration option where I add user:password in the remote url.

In the normal case, with working clients (git version 2.25.1, on Ubuntu), I see the following requests / response flow:

GET -> 401 unauthorized
GET -> 200 OK

The first request I assume is used by git to realize that authorization is needed, and git obliges and sends a second request with authorization headers.

But the faulty clients (git version 2.32.0.windows.2 on Windows 10) do not do this. They simply do:

GET -> 401 unauthorized

And do not send a second request. This does not happen always: intermittently, they revert to the good flow and send a second request, so that the operation succeeds.

I am out of ideas.

0 Answers
Related