2

I followed the guide here http://www.hackido.com/2010/01/installing-git-on-server-ubuntu-or.html

but I cannot find the proper way to import another ssh key so my other computers can clone and push the repos.

this code specifically sudo -H -u git gitosis-init < /tmp/id_rsa.pub perks my ears as it seems to import only one key to the git user. I tried running the same command with an authorized_keys file containing both my public keys but that did not work.

Any advice? thanks

UPDATE

I cloned gitosis-admin locally on the server using my local user. I scp my .pub files from each computer to my server then renamed them and stuck them in gitosis-admin/keydir/ . I then made the following changes to the gitosis.conf file per @rpflo advice.

[gitosis]

[group gitosis-admin]
writable = gitosis-admin
members = serv

[group all-repos]
writable = myproject
members = serv work win7top

after successfully committing and pushing the changes I still cannot git push "git@server:myproject.git" to the server (after init and setting origin etc..)

hmmm

[SOLVED]

well it tuns out i didn't "git add . " my key files to gitosis-admin/keydir after i edited the conf file.

thanks for the help

user564448
  • 387
  • 3
  • 9
  • user564448: Please move the [SOLVED] section into an answer, and then accept your own answer. Otherwise this question will stay marked as unsolved. – hlovdal Feb 11 '11 at 23:29
  • 2
    user564448: Better yet, accept rpflo's answer below since it is the correct answer. – ebneter Feb 11 '11 at 23:56

1 Answers1

3

If gitosis is installed correctly you simply add a key to the keys directory of your gitosis repository

gitosis-admin/
    gitosis.conf
    keydir/
        sally.pub
        joe.pub
        bob.pub

Then in gitosis.conf you create groups

[group gitosis-admin]
writable = gitosis-admin
members = joe

[group all-repos]
writable = repo1 repo2 another-project
members = joe bob sally
Ryan Florence
  • 13,361
  • 9
  • 46
  • 63
  • i put my server users ssh key (server.pub) as the only member for the gitosis-admin group and create a [group all-repos] and included all my computers just as you have. I copied my id_rsa.pub keys (and renamed them according to the gitosis.conf members line) but I when i check out from another computer it is still asking for user git's password. see my edit – user564448 Feb 11 '11 at 22:07