开发者

How to add other users(windows) to gitosis

I just setup an git repository using gitosis. What I can't figure out is how to add other users. All tutorials I find only says "gather their public SSH keys".

First of I tried to create the locally on my machine (not server) but I kinda figured that's the wrong way to go.

Now I've tried to create public key using PuTTy keygen on a windows machine, saved the key and put it in to the keydir under gitosis-admin directory.

I've tried both git clone git@cn-linuxdev.****.***:tungsten.git and git clone tor@cn-linuxdev.****.***:tungsten.git where tor is the name of the file in keydir.

The error generated in auth.log is Failed password for git from 192.168.0.158 port 63305 ssh2

From the windows client I've also tried the password set during setup sudo -H -u git gitosis-init < /tmp/id_rsa.pub.

This ssh key come开发者_JAVA技巧s from my local computer. And this password works from there but not the windows client.

I don't quite understand how the ssh-keys work but I would guess they are bound in someway to the computer they are generated on.

So have anyone managed to set up gitosis with other users and windows users? How did you get it to work?


Each user should generate his/her own couple of public and private ssh key.

See this GitHub help page.
Then they need to send you the content of their $HOME/.ssh/id_rsa.pub for you to call gitosis-init with to edit the config file appropriately and check in (and push) the keys in keydir/..
(thank you, ebneter, for the correction).
For instance, in this mantisbt gitosis management page:

$ cat > keydir/jsmith.pub
...
^D

$ git add gitosis.conf keydir/jsmith.pub
$ git commit -m "Added 'myplugin' repository and 'jsmith' user."

$ git pull --rebase    # make sure we have the latest updates from the server
$ git push

Note: all user side operations (like ssh-keygen -t rsa -C "my@email.com" or $HOME/.ssh/id_rsa.pub) need to be done or evaluated in a Git bash environment, not in a Dos shell.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜