Users do not need shell accounts on the git server. The operations are done under the shared account. Another benefit is easier user and repository management.
The management is done by a special repository named gitosis-admin. Here we want to set up a git server on example. We need to create a Linux account for the shared account. It is usually git. But any account name can be used.
Logon to the git server by ssh username example. Now we have created the gitosis administration repository on git server. These files are used to manage repositories and users by the administrator. I ended up checking the actual repository on the server which contained my updated gitosis. Once I replaced the contents of this file with the one in the repository I was able to create and use the new repository with no problems.
Does anyone know what could be causing this? I know that gitosis uses a post-update hook to update the server appropriately, so I think the problem most likely resides around that. Check the permissions on the post-update hook in the repository. As a reminder the second part of this series will show an svn to git import. For now lets assume we are starting from scratch.
We'd create our project like this:. The only other thing to know is if you want to grant another user access to your repository. All you have to do is add their public key to the keydir folder, and then give the user permissions by modifying gitosis.
This article showed how to setup gitosis, how to initialize your gitosis-admin repository, which is a unique concept in itself to use a repository to manage repositories, and it works rather well. We also went over how to create our own new git repository, and how to manage the access permissions through gitosis.
Part two of this series will explain how to port from your current SVN setup to a Git setup. This article was a prerequisite if you want to host your own private repository when you're converting from SVN to Git, and thats what we'll look at next time. My gitosis is working all good with my user. But I found some issues when trying to add my friend to it.
I did as told, and added his public key in the gitosis-admin, also added him to the group, and so on. Should I give this user the git private key, or did i miss something in the configuration? I'm getting this too, under Debian. In the interim, you can edit it manually with your friend's key. Gitolite allows a server to host many git repositories and provide access to many developers, without having to give them real userids on the server. It can also restrict who can push to what branch or tag, which is very important in a corporate environment.
0コメント