Repository Access Control with GIT over HTTPS

git

We recently began experimenting with GIT and are looking to possibly switch over from SVN to GIT. I setup a server for git that is currently using the SSH protocol. There server is running CentOS 6.5. My colleagues want to use a GUI tool and I've read that GitHub for Windows app can be used on non Github repositories but for the life of me I haven't been able to get it to work with SSH protocol. I've thought about using HTTPS protocol instead but I want some kind of access control. With SSH it uses the UNIX file permissions. Is there a way to use HTTPS and still enforce read/write permissions? I have seen mention of Gitosis. Is that a could option for enforcing permissions over HTTPS? Do you know of any good resources for setting this up?

Best Answer

I recently setup a Git server where I work which required SSH and HTTP(S) access for public and private repositories. I first setup the entire thing manually which took some time, but then I came across Gitlab which seemed to solve all my problems - it's pretty much Github, but your own private hosted version. I'd strongly recommend using Gitlab over setting everything up manually, given that it has so many great features and is easily manageable.

There's a great tutorial here: https://github.com/gitlabhq/gitlab-recipes/blob/master/install/centos/README.md

However, if you do want to run Git through HTTP(S), you will need to setup Apache or Nginx to use the git-http-backend binary which does all the work. There are plenty of tutorials online depending on which configuration you decide to go with.