http authorization caching
Brad Schick
schickb at gmail.com
Fri Aug 17 23:26:37 CDT 2007
Alexis S. L. Carvalho wrote:
> Thus spake Brad Schick:
>
>> Does mercurial have any way to cache basic http authorization? I'm
>> setting up a repo that is private, so even pulls is restricted, and
>> we're finding it a hassle to type username and password so often. Even
>> just stashing the username and hashed password in a file would be fine.
>>
>> I realize ssh has caching with ssh-agent, but we aren't able to create
>> multiple ssh accounts on the server.
>>
>
> You can put something like this in your .hgrc:
>
> [paths]
> foobar = http://user:passwd@hg.example.com/path/to/repo
>
> and then use "hg pull foobar"
>
>
Unfortunately this displays the username and password each time you do
something with that path. I tried a similar solution just by setting
default. Since I tend to leave windows open when people are in my
office, its problematic. It might be reasonable to change mercurial to
not output that part of the path during commands.
I also submitted this patch that lets you put the username and password
in a config file:
http://www.selenic.com/pipermail/mercurial-devel/2007-August/002618.html
It seems to be on hold, although I believe the expressed concern would
not impact the patch:
http://www.selenic.com/pipermail/mercurial-devel/2007-August/002626.html
-Brad
More information about the Mercurial
mailing list