Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

GIT server setup
New on LowEndTalk? Please Register and read our Community Rules.

GIT server setup

djvdorpdjvdorp Member
edited February 2012 in Help

Hi all,

I need to setup a GIT server on one of my VPSes, and find lot of tutorial mentioning
Gitolite and Gitosis.
Can someone point me/advise me to a recent tutorial on this, and advantages of one or another?

Thanks in advance!



    I had better results using gitolite. That said, you're as well just getting a bitbucket account and hosting unlimited private repositories there.

    Thanked by 1djvdorp
  • +1 for bitbucket .... as long as you are on the right side of the world of course!

  • @TigersWay said: +1 for bitbucket .... as long as you are on the right side of the world of course!

    Which side would that be, America :P ?

  • TigersWayTigersWay Member
    edited February 2012

    :-P They are in Australia. From here (Thailand) they are a bit better than github which does not allow free private repo anyway
    And I will never use "right side" to talk about "America" :-D

  • djvdorpdjvdorp Member
    edited February 2012

    Ah okay! How about ?
    (for hosting at them)

  • Why not just install git-core and then:

    mkdir work.git
    cd work.git
    git init --bare

    Then ssh your code to ssh://[email protected]:/path/to/work.git?

    Thanked by 1djvdorp
  • Another option if you'd prefer a web interface to manage your gitolite configuration is Gitlab: - the installation includes the initial configuration of gitolite.

    Thanked by 1djvdorp
  • fanovpnfanovpn Member
    edited February 2012

    Gitolite is very nice even for single users, it's much faster to create a new repository then having to SSH to your server and do it by hand, and if you do ever want to give people access to a repository you don't have to give them access to your user account (or create a new user for them and mess around with group permissions on the git repository). It's also possible to control which repositories people have access to, and what level of access (read-only is possible). Everything is done by git cloning the gitolite-admin repository, adding a line to a config file (or copying an SSH keys to the keys directory to give access), committing the changes, and pushing the repository back to the server.

    Gitolite's documentation is shockingly difficult to use, the developer appears to spend just as much time writing documentation as code, and it's all randomly spread out over a massive directory of files with little organization (the "master TOC" or google is probably the only way to find things in the docs), but the basic installation is actually pretty streamlined.

    What I do is (make sure git is installed and) create a new user (called git by convention), su to him (I run as a normal user and use sudo: "sudo -u git -i") -- do not try to login as git over SSH to get a shell, that's bad because you're probably going to be disabling your ssh access to git's shell as part of the install -- and then follow the 3-4 steps in . That should be it, I don't think you even need to edit the default settings under ~git/.gitolite.rc anymore, but like the instructions say make sure you add ~/bin to [email protected]'s PATH inside the .bash_profile before installing (and maybe exit the git shell and restart it after making the change). You should now be able to clone the gitolite-admin to your workstation and start creating new repositories.

    There are a lot of advanced options like anonymous 'mob' read-only access, setting up HTTP access via the git-http-backend cgi script, controlling HTTP access via .htpasswd files, allowing users to create their own repositories under username subdirectories without requiring admin access, or setting up master-slave replication (with write passthrough). But that requires some spelunking through the documentation to figure out what's even possible and where to look to set it up.

    Before setting it up, be sure you understand SSH keys, and have a working one (I guess this is true of any of the git hosting services too). gitolite adds an extra twist by adding your key to [email protected]'s authorized_keys file with a special command prefix to only allow that key to run the gitolite interface, which is like setting a default shell for anyone using that key. That special command prefix is ignored by older versions of dropbear, so keep that in mind if you're on a lowendbox scripted setup (I think dropbear 0.53 added support for commands, but I haven't tried it with gitolite yet).

    Thanked by 1djvdorp
  • @TigersWay said: :-P They are in Australia

    Always thought BitBucket was in Australia because I could access much better than Github.... Well :-( I was wrong: they are in US, and real Australia is VERY far from Thailand!

    Thanked by 1djvdorp
Sign In or Register to comment.