[ssh] Password in URL

Matt Mackall mpm at selenic.com
Mon Dec 14 14:52:52 CST 2015


On Mon, 2015-12-14 at 22:56 +0300, Blaise Thorn wrote:
> The documentation https://www.selenic.com/mercurial/hg.1.html#urls
> says:
> > http://[user[:pass]@]host[:port]/[path][#revision]
> > https://[user[:pass]@]host[:port]/[path][#revision]
> > ssh://[user@]host[:port]/[path][#revision]
> 
> Attempt to specify a password (like "hg clone ssh://user:PASSWORD@exa
> mple.com/repo") results in
> > abort: password in URL not supported!

OpenSSH and friends intentionally don't support it because they think
it's a bad idea to expose your ssh keys to every other user and process
on the system. Secondly, unlike http, they provide a _really good
alternative_ called an agent so you should never need to pass a
password on the command line.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial mailing list