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