简体   繁体   中英

Gitosis: only works editing authorized_keys

The only way I can have access to gitosis projects is by manually copying the id_rsa.pub of each account I added, into home/git/.ssh/authorized_keys . If I copy/paste the output from the id_rsa.pub into authorized_keys, then Im able to clone using that account im adding.

If I copy the id_rsa.pub into keys dir and then modify the gitosis.conf and add that user then im not able to clone, git keeps asking for password. Is it that the way this should work? Also, if I leave it this way, each account I add has access to every project and this is something I dont want to happen.

Done. First I was using as part of the clone path user@server: REPOSITORIES /gitosis-admin.conf

That was causing all the issue.

I can now clone the project, add new keys into keydir, push the project and then the client is able to clone and edit:

user@server:gitosis-admin.conf

Note: Dont manually touch the /home/git/.ssh/authorized_keys . Gitosis will do it for you when you add the key into keydir.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM