Git password prompt from command line

I am configuring git and gitosis on the server to manage my repositories. It works correctly for the initial shell account with which I configured it, i.e. I can run:

git clone git@MYSERVER:gitosis-admin.git

But when I try to use the individual accounts that I created (via gitosis.conf), it keeps asking for the password:

git clone johndoe@MYSERVER:gitosis-admin.git

I configure the SSH key and push the copy to keydir on the server. This question seems to be about the same problem, but the solution is for the turtle.

Git keeps asking for a password

How to tell git to use the ssh key instead of asking for a password?

+3
source share
2 answers

You are not using your username, you always say:

git clone git@MYSERVER:<repository>

Gitosis .

[group users]
members = johndoe janeroe
writable = repo1 repo2

gitosis.conf johndoe.pub, janedoe.pub gitosis-admin/keydir; gitosis , "git" URL-. , "git".

+5

, , AFAICT johndoe@MYSERVER . git@ , ssh- , , () johndoe janedoe.

, SSH johndoe , , , git id johndoe. , , , . SSH , johndoe git, , .

OTOH, gitosis , ssh johndoe , , johndoe @... git. , git .

+2

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


All Articles