git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Ketan Padegaonkar <ketanpadegaonkar@gmail.com>
Cc: Jacob Helwig <jacob.helwig@gmail.com>, git-dev <git@vger.kernel.org>
Subject: Re: [http] Git error messages reveal password encoded in the URL
Date: Tue, 20 Jul 2010 02:41:45 +0200	[thread overview]
Message-ID: <201007200241.46972.jnareb@gmail.com> (raw)
In-Reply-To: <4C44DEF7.4000903@gmail.com>

Dnia wtorek 20. lipca 2010 01:25, Ketan Padegaonkar napisał:
> On 7/19/10 2:16 PM, Jacob Helwig wrote:
>> On Mon, Jul 19, 2010 at 14:10, Jakub Narebski<jnareb@gmail.com>  wrote:
>>> Dnia poniedziałek 19. lipca 2010 23:05, Jacob Helwig napisał:
>>>> On Mon, Jul 19, 2010 at 14:02, Jakub Narebski<jnareb@gmail.com>  wrote:
>>>>> 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,
> 
> Apologies. I used the wrong punctuation. It should read as:
> 
> We use https+basic auth to serve up git repos. Unfortunately SSH is not 
> an option for various reasons.

Is it because of firewall, or it is the issue with issuing shell 
accounts?  If the latter, you can use tools such as gitosis or gitolite
which need only one single shell account, and control access via public
key infrastructure.

> 
> In order for git to not ask me the username/password, I 'encoded' the 
> username/password into the url.

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.

> I'm using git v1.7.1.1 on MacOSX Leopard. I can see the same behavior on 
> master (rev 24e7a5).

-- 
Jakub Narebski
Poland

  reply	other threads:[~2010-07-20  0:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-19 17:00 [http] Git error messages reveal password encoded in the URL Ketan Padegaonkar
2010-07-19 21:02 ` Jakub Narebski
2010-07-19 21:05   ` Jacob Helwig
2010-07-19 21:10     ` Jakub Narebski
2010-07-19 21:16       ` Jacob Helwig
2010-07-19 23:25         ` Ketan Padegaonkar
2010-07-20  0:41           ` Jakub Narebski [this message]
2010-07-20  7:46             ` Tay Ray Chuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201007200241.46972.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jacob.helwig@gmail.com \
    --cc=ketanpadegaonkar@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).