passing username and password in non-interactive mode

Bastian Doetsch bastian.doetsch at gmx.de
Mon Nov 24 12:54:24 CST 2008


Am Montag, den 24.11.2008, 19:41 +0100 schrieb Isaac Jurado:

> On Mon, Nov 24, 2008 at 7:24 PM, Bastian Doetsch <bastian.doetsch at gmx.de> wrote:
> >
> > E.g. http(s) authentication or ssh authentication with private access,
> > so no read is possible without authenticating.
> 
> Then you could set up public/private key based authentication.  With
> https is tricker to do from the client side, but for ssh is a breeze.
> 
> This saves you from typing passwords interactively nor compromising the
> account by writing sensitive information in clear text.


Thanks for your reply, I appreciate your help!

The problem is that I know to exchange ssh keys (and actually do it),
but I would like to be able to offer all Mercurial remote communication
options that are available on the command line to users of
MercurialEclipse. Being a GUI, calling out to HG it seems to run
automatically in non-interactive mode, so interactive authentication is
omitted. Currently we use the URI for passing the authentication data,
but it leaks authentication information. 

So you're of course right, workarounds exist (you could also edit the
hgrc file not to contain authentication info after having initially
cloned, even automatically), but the question remains - is there a way
to pass authentication data to Mercurial without leaking it?

If there was a way to enforce interactive mode, that could be a way to
solve this problem, but actually I'd prefer to be able to pass the
information as parameters. Same for hg sign - how to pass a password
there? I haven't succeeded so far, so we rely on gpg-agent, which might
not be available on all operating systems :(.

Thanks again,
Bastian


> 
> Cheers.
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial/attachments/20081124/4768bb85/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://selenic.com/pipermail/mercurial/attachments/20081124/4768bb85/attachment.pgp 


More information about the Mercurial mailing list