Re: How to provide authentication along with git command itself ?
- From
Carlos Martín Nieto <cmn@elego.de>
- Date
- Jul 14, 2011, 10:50 UTC
- Message-ID
- <1310640646.18730.10.camel@bee.lab.cmartin.tk>
- In-Reply-To
- <20110714161508.2378c155@shiva.selfip.org>
On Thu, 2011-07-14 at 16:15 +0530, J. Bakshi wrote:
Show 6 quoted lines
> Hello list, > > During git push or fetch over http , I need to provide username and > password every time, as protected by apache htpasswd file. How can I > provide the same along with git command ? Or something so that It save > the authentication info somewhere within .git
The http transport uses the ~/.netrc file to get its authentication data. `man netrc` will tell you about the syntax; for git, you need the 'machine', 'login' and 'password' fields.
Cheers, cmn