Automating Authentication

Martin Geisler mg at lazybytes.net
Tue Jul 21 04:02:41 CDT 2009


"Parekh, Nilesh" <nparekh at qualcomm.com> writes:

> I am trying to use Hudson with Mercurial plugin to automate build
> process. The problem I am facing is that repository uses https scheme
> for authentication and Hudson Mercurial plugin does not have a way to
> supply username and password. I tried "auth" in .hgrc and it does not
> work (i.e. I am still prompted for username/password).
>
> Manpage for Auth:

> Authentication credentials for HTTP authentication. Each line has the
> following format:
>
> <name>.<argument> = <value>
>
> where <name> is used to group arguments into authentication entries.
> Example:
>
> foo.prefix = hg.intevation.org/mercurial
> foo.username = foo
> foo.password = bar
> foo.schemes = http https
>
> bar.prefix = secure.example.org
> bar.key = path/to/file.key
> bar.cert = path/to/file.cert
> bar.schemes = https
>
> Anyone knows if this works?

I use it all the time with Mercurial 1.3 ([auth] is not available in
earlier versions, so please check with 'hg version' that you have 1.3).
I use it for bitbucket as follows:

[auth]
bb.prefix = https://bitbucket.org/mg/
bb.username = mg
bb.password = ...

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.


More information about the Mercurial mailing list