If you need your own remote Git server, you can just create Git bare repositories in your Linux server, like this:
git init --bare /git/myRepo.git
And make the repository available to system users, using chmod to determine who can access to which files. Then, users can access via SSH:
git clone ssh://email@example.com/git/myRepo.git/
This approach is fast and easy to implement, but insecure and complicated, because permissions on Linux can be tricky and disable console access while maintain SSH working for git command is not an easy task.
Is a great tool to deal with this type of work. You install Gitosis in your server and then clone a configuration project to your local machine, in which you can manage the Git server (users, repositories, groups) using git. All users, including admin, have access via the gitosis user, and that user has console access disabled.
First, use a package installer to install git-core and gitosis:
sudo apt-get -y install git-core gitosis
Initialize gitosis using your public key:
sudo -H -u gitosis gitosis-init < yourPublicKey.pub
Where yourPublicKey.pub is a copy of the public key from your local machine.
And, in your local machine, checkout the gitosis-admin branch:
git clone firstname.lastname@example.org:gitosis-admin.git
You can edit the configuration file:
And add projects, users or groups.
After your're done, save the file and commit back:
git commit -a -m "New project, yeah!" git push
More detailed info here: