If ssh doesn't ask for password every time with Mercurial

I am new to Mercurial and I just started using it.

I work in a local repository, and when I make changes, I use hg <command> ssh://user@host/usr/www/site.com/projectto push, pull, and view incoming / outgoing changes.

But every time ssh asks for a password. Is there any way to remember my ssh password for this purpose? In addition, how can I not write the complete command every time (ssh: // user, etc.)?

+5
source share
1 answer

You need to configure ssh with public keys. There are many tutorials on the Internet, for example. see Getting started with SSH

, , ssh-agent, . GUI, ssh-agent (, SSHKeychain Mac)

, , .

, , .

URL- :

hg help urls

These URLs can all be stored in your hgrc with path aliases under the
[paths] section like so:

  [paths]
  alias1 = URL1
  alias2 = URL2
  ...

- :

default:
  When you create a repository with hg clone, the clone command saves the
  location of the source repository as the new repository 'default'
  path. This is then used when you omit path from push- and pull-like
  commands (including incoming and outgoing).

, , - URL- .

+4

All Articles