I have git repository (powered by gitosis) on my local ubuntu server
I want to have an access from the other local computer powered by windows xp (msysgit)
I have generated rsa key on windows machine and published to ubuntu server
I have .ssh/config file setted to use this key on windows machine
When I do
ssh git@192.168.0.6
this works as desired, without password prompt
However when I try to clone repository with :
git clone git@192.168.0.6:gitosis-admin
or
git clone ssh://192.168.0.6/~/gitosis-admin
then I got following errors:
fatal: 'gitosis-admin' does not appear to be git repository
When I try to clone with existing user account e.g. user named atom
git clone atom@192.168.0.6:gitosis-adm开发者_运维问答in
this works as desired, but does not work for other repo projects
My gitosis.conf:
[gitosis]
[group gitosis-admin]
writable = gitosis-admin
members = windows_user atom@atom-desktop
[group team]
writable = another_project
members = @all
So my question is: 'Where is the problem ?' Should I change setting of gitdaemon ?
According to this tutorial, git clone can be done even before starting tinkering with the gitosis.conf
file.
So did you follow those steps?
Firstly, it will have created a user called "git".
It has full power over the deposits, having in his home directory.
# Useradd-G git-d / home / git-s / bin / bash-m git
Then we will get the SSH public key, and put in a temporary file as
/tmp/cle.pub
.
We will then, as root, run these commands:
sudo-H-u git gitosis-init < /tmp/cle.pub
In this case, we'll run as git, but in addition, we will run into the home of the latter.
Thegitosis-init
command will initiate the filing by adding the user's public key as the deposit containing Committing configuration.If successful, you should get a result like this:
Initialized empty Git repository in. /
Initialized empty Git repository in. /
(Yes, twice!)
And if you view the contents of git home, like magic, it is full of files!
Now we'll change the file permissions.
Indeed, I sometimes noticed it does not change because of rights problems.
sudo chmod 755 /home/git/repositories/gitosis-admin.gif/hooks/post-update
This being done, I am pleased to announce that Git your server is ready, and it only remains to add your deposits and your users!
Now all configuration is done on your computer via the deposit that we will import at once:
git clone git @ [server address]: gitosis-admin.gif
cd-gitosis admin.gif
精彩评论