I am looking for installing a git server to share projects with my team.
You can just use git.
To have a git server the only thing you need on the remote server is git. If you don't require fine-grained permissions (sharing with only your team suggests that's a possibility) or any extra features, you don't need gitolite, or similar.
The no-install solution
If git is available on the remote server, you can do what you're asking right now, without doing anything
ssh [user@]server
cd repos/are/here/
mkdir project.git
cd project.git
git init --bare
Locally:
cd projects/are/here/project
git remote add origin [user@]server:repos/are/here/project.git
git push -u origin master
Setting up a git server is easy.
If you want to do things with a dedicated git user, the docs for setting up a git server are short - because it really is quite easy to do.
In summary:
- Install git
- Create a user named git
- Add your and your team's public keys to the git user's
.ssh/authorized_keys
file
- Change the git user's shell to be
git-shell
- Create repos on the server
- start git pull/pushing to [email protected]
The only difference between using a dedicated git user and not, is that if you setup the git user to use git-shell
it won't allow itself to do anything else. In terms of acting as a git server though, it's identical to the no-install solution