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

Re: [http] Git error messages reveal password encoded in the URL

From
Jakub Narebski <jnareb@gmail.com>
Date
Jul 19, 2010, 21:02 UTC
Message-ID
<m3aapnmbid.fsf@localhost.localdomain>
In-Reply-To
<4C4484A4.5010009@gmail.com>
Ketan Padegaonkar <ketanpadegaonkar@gmail.com> writes:
> We use http to serve our git repos, in order for git to not ask me a
> username/password everytime, 

Errr... WTF? Can't you configure SSH (use ssh-add, perhaps together with tool such as keychain) to use public key based authentication?

Show 14 quoted lines
> I've put the following in my .git/config:
> 
> [remote "origin"]
>    url = https://user:pass@host/repo.git
> 
> What is discerning is that every time git encounters a problem
> connecting to the repo, I get the following error containing both my
> username and password.
> 
> error: Couldn't resolve host 'host' while accessing
> https://user:pass@host/repo.git/info/refs
> 
> I would like to suggest that the password be removed/masked from this
> error message.

Which git version do you use? I recall vaguely that something was done in this direction (masking passwords in URLs).

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Ketan PadegaonkarNext: Jacob Helwig
Message 2 of 8 in “[http] Git error messages reveal password encoded in the URL”
  1. Ketan PadegaonkarJul 19, 2010
  2. Jakub NarebskiJul 19, 2010
  3. Jacob HelwigJul 19, 2010
  4. Jakub NarebskiJul 19, 2010
  5. Jacob HelwigJul 19, 2010
  6. Ketan PadegaonkarJul 19, 2010
  7. Jakub NarebskiJul 20, 2010
  8. Tay Ray ChuanJul 20, 2010

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.