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

git https transport and wrong password

From
Mikko Rapeli <mikko.rapeli@iki.fi>
Date
Apr 2, 2013, 15:54 UTC
Message-ID
<20130402155440.GT30514@lakka.kapsi.fi>
Hi,

I have a problem with git (1.7.9 and 1.8.2.357.gcc3e4eb) and https transport to gerrit server (2.5.1-3-g719dfc7). I'm producing the problem on Cygwin but my colleagues have same issue on Linux as well.

Gerrit server is matching corporate policies with single sign on, so after three failed login attempts the account gets locked until a password reset.

Git amplifies this problem by asking for users password only once, and if user made a typo git is still re-using the wrong password enough times to get an account immediately locked.

I have client side logs with GIT_CURL_VERBOSE=1 but from intranet so can't publish them directly. Here's roughly what the log shows:

---------------------------------------------------------------

$ GIT_CURL_VERBOSE=1 git fetch ...

> GET /gerrit/.../info/refs?service=git-upload-pack HTTP/1.1

... < HTTP/1.1 401 Authorization Required ...

---------- I guess git prompts for password here. --------------
* Issue another request to this URL: 'https://..info/refs?service=git-upload-pack'
...
* Re-using existing connection! ...
...
* Server auth using Basic with user '...'
> GET /gerrit/.../info/refs?service=git-upload-pack HTTP/1.1
Authorization: Basic ...
...
< HTTP/1.1 401 Authorization Required
< Date: ...
* Authentication problem. Ignoring this.
...
* The requested URL returned error: 401
* Closing connection 0
...
* About to connect() to ...
...
* Connected to ...
...
* STATE: PROTOCONNECT => DO handle...
* Server auth using Basic with user '...'
> GET /gerrit/.../info/refs?service=git-upload-pack HTTP/1.1
Authorization: Basic ...
...
* STATE: DO => DO_DONE handle...
* STATE: DO_DONE => WAITPERFORM handle...
* STATE: WAITPERFORM => PERFORM handle...
...
< HTTP/1.1 302 Found
...
< Location: ...funnylongurl
...
* Ignoring the response-body
* Connection #1 to host ... left intact
* Issue another request to this URL: '...funnylongurl'
...
* Server auth using Basic with user '...'
> GET ...funnylongurl
Authorization: Basic ...
...
* The requested URL returned error: 500 Internal Server Error
* Closing connection 1
...
* About to connect()...
...
* Server auth using Basic with user '...'
> GET /gerrit/.../info/refs HTTP/1.1
Authorization: Basic ...
...
< HTTP/1.1 302 Found
< Date...
< Set-Cookie...
< Cache-Control: no-store
< Location: ...funnylongurl
...
* Re-using existing connection! (#2)...
> GET ...funnylongurl
...
* The requested URL returned error: 500 Internal Server Error
* Closing connection 2
...
error: The requested URL returned error: 500 Internal Server Error while accessing ...
fatal: HTTP request failed
---------------------------------------------------------------

Any idea what could be wrong here? Is git client really retrying with the bad password?

Regards,
-Mikko
Next: Mikko Rapeli
Message 1 of 9 in “git https transport and wrong password”
  1. Mikko RapeliApr 2, 2013
  2. Mikko RapeliApr 2, 2013
  3. Jeff KingApr 2, 2013
  4. Mikko RapeliApr 2, 2013
  5. Jeff KingApr 2, 2013
  6. Mikko RapeliApr 2, 2013
  7. Mikko RapeliApr 3, 2013
  8. Jeff KingApr 3, 2013
  9. Mikko RapeliApr 3, 2013

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.