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
Tay Ray Chuan <rctay89@gmail.com>
Date
Jul 20, 2010, 07:46 UTC
Message-ID
<AANLkTilYeKkJlUaB7zRgvIR_OyzrabWG1iPLbmrvkAqu@mail.gmail.com>
In-Reply-To
<201007200241.46972.jnareb@gmail.com>
Hi:
On Tue, Jul 20, 2010 at 8:41 AM, Jakub Narebski <jnareb@gmail.com> wrote:
> Dnia wtorek 20. lipca 2010 01:25, Ketan Padegaonkar napisał:
[snip]
Show 16 quoted lines
> Can't you use ~/.netrc file[1] instead?  As far as I see this would not
> show password info on error.  Not that the current situation should
> not be fixed, but it might be worthwhile workaround for a time.
>
> The ~/.netrc file would look like this for your example:
>
>  machine host
>  login user
>  password pass
>
> You should of course `chmod 600 ~/.netrc`
>
> [1] This is unfortunately underdocumented: only this documentation
> Documentation/howto/setup-git-server-over-http.txt mentions ~/.netrc
> file.  I think that handling the $HOME/.netrc is done by the curl
> library that git uses, see libcurl-tutorial(3) manpage.
+1
This is the only way I know of to "hide" your password.

Of course, depending on your authentication scheme, your efforts for this setup may prove worthless.

-- 
Cheers,
Ray Chuan
Previous: Jakub Narebski
Message 8 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.