ssh and passwords

Jason Harris jason at
Fri Mar 25 17:11:11 CDT 2011


I just saw the commit by Matt about not being able to handling passwords for ssh which are embedded in the URL.

I have had a glance over the code in and looking at it one can see that we currently have bugs like:

  hg identify --noninteractive ssh://jason@

and running this command prompts me interactively for my password (when I of course explicitly asked for non-interactive.)

Also looking around it appears that although you can set up default usernames and passwords in the [auth] section of the hgrc files, but you can only do this for http and https. Ie you can't do this for ssh.

I just became aware of this since previously all of my ssh connections were passwordless, and I had access to all my servers as one normally would so I was a bit surprised to find that ssh protocol didn't handle passwords in its URL... See

I have a rough understanding of this and the fact that ssh is asking for these things outside the normal stdin, stdout, stderr. Would there be interest in fixing this by using eg or something similar. Or is there a better way to fix this?


More information about the Mercurial-devel mailing list