Mercurial, Key Authentication

I have such a section in my ~/.hgrcconfiguration file

[auth]
repo.prefix = ssh://hguser@192.168.132.72/repos
repo.key = /home/zerkms/.ssh/mercurial-repo/id_rsa

But when I write:

hg clone ssh://hguser@192.168.132.72/repos/rps .

mercurial still requires a password.

What did I do wrong?

To avoid obvious questions:

Yes, there is a valid key in the specified path, and it works if used with ssh-agent.

My question is how to work with keys in a section [auth].

+3
source share
2 answers

auth SSH. -. ~/.ssh/id_rsa, , - , . ~/.ssh/id_rsa - - ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys , .

+9

(, ):

hgrc:

[ui]
ssh = ssh -C -i ~/.ssh/id_rsa-mercurialkey

-C , -i . ssh-agent, .

+5

Source: https://habr.com/ru/post/1774875/


All Articles