Posts

Gitolite Installation Step-By-Step

In this post I will walk you through how to setup your own gitolite server and start hosting your own git repositories.

Gitolite is a great tool for doing this and works in a very git-like way for managing users, access-rights and setting up new repositories for collaboration between your team. A common reason to setup Gitolite is to remove reliance on services like GitHub.

Let’s begin…

We need hardware!

First, I fired a new machine on Linode. I’m not going to go into the details of that, but it was a fresh install of “Ubuntu 12.04 LTS 64bit” with root user setup and ssh access to the root user via password. This is simply how Linode does it. I know that many people will try this on Amazon Web Services, so I’ve prefixed all appropriate root commands with “sudo” and you will only have replace “root” with “ubuntu” (or whatever the default username is on the AMI you fire-up).

Mr. Gitolite

First, we are going to login to our remote machine, which will be hosting gitolite on, and we are going to create the “gitolite” user.

phil@air:~
$ ssh [email protected]
The authenticity of host '66.175.220.39 (66.175.220.39)' can't be established.
RSA key fingerprint is 0c:9a:e3:6d:03:21:ce:1b:8c:bb:1d:20:69:cd:98:75.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '66.175.220.39' (RSA) to the list of known hosts.
[email protected]'s password:
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.4.2-x86_64-linode25 x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Tue Jul 24 02:57:20 UTC 2012

  System load:  0.07              Processes:           77
  Usage of /:   2.4% of 19.48GB   Users logged in:     0
  Memory usage: 7%                IP address for eth0: 66.175.220.39
  Swap usage:   0%

  Graph this data and manage this system at https://landscape.canonical.com/

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

root@localhost:~# sudo adduser \
   --system \
   --shell /bin/bash \
   --gecos 'git version control' \
   --group \
   --disabled-password \
   --home /home/gitolite gitolite
Adding system user `gitolite' (UID 107) ...
Adding new group `gitolite' (GID 114) ...
Adding new user `gitolite' (UID 107) with group `gitolite' ...
Creating home directory `/home/gitolite' ...

Now we can return to our local machine.

root@localhost:~# exit
logout
Connection to 66.175.220.39 closed.

Anyone seen my keys?

In order to provide easy access to the gitolite user on the remote machine, we need to create a key-pair. This is the public and private keys used for ssh.

First, we will create the key pair on our local machine and we will call this key-pair “gitolite”.

phil@air:~
$ cd ~/.ssh
phil@air:~/.ssh
$ ssh-keygen -t rsa -f gitolite
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in gitolite.
Your public key has been saved in gitolite.pub.
The key fingerprint is:
ca:31:15:88:c1:0a:c7:42:09:f7:b5:dc:22:d2:52:62 [email protected]
The key's randomart image is:
+--[ RSA 2048]----+
|+oE.oo...        |
|o+o=oo.o .       |
| +o.+ + o        |
|  .o . o         |
|      o S        |
|     . +         |
|      o          |
|                 |
|                 |
+-----------------+

We can see that the 2 keys have been created.

phil@air:~/.ssh
$ ls -l ~/.ssh/gitolite*
-rw-------  1 phil  staff  1679 23 Jul 19:58 /Users/phil/.ssh/gitolite
-rw-r--r--  1 phil  staff   396 23 Jul 19:58 /Users/phil/.ssh/gitolite.pub

“gitolite” is the private key and “gitolite.pub” is the public key.

Upload the public key to the root user’s account on the remote machine.

phil@air:~/.ssh
$ scp ~/.ssh/gitolite.pub [email protected]:
[email protected]'s password:
gitolite.pub                                                                                                                 100%  396     0.4KB/s   00:00

Login to the root users account on the remote machine…

phil@air:~/.ssh
$ ssh [email protected]
[email protected]'s password:
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.4.2-x86_64-linode25 x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Tue Jul 24 03:00:05 UTC 2012

  System load:  0.02              Processes:           75
  Usage of /:   2.4% of 19.48GB   Users logged in:     0
  Memory usage: 7%                IP address for eth0: 66.175.220.39
  Swap usage:   0%

  Graph this data and manage this system at https://landscape.canonical.com/

Last login: Tue Jul 24 02:57:20 2012 from s12079106cffd1777.vc.shawcable.net

…and move the key to the gitolite user home directory, being sure to also change the permissions.

root@localhost:~# sudo mv gitolite.pub /home/gitolite
root@localhost:~# sudo chown gitolite:gitolite /home/gitolite/gitolite.pub

Let’s git it on

As I mentioned at top of this post, the remote machine is a fresh machine, so we need to install the “git” command. btw, this command is specific to Ubuntu.

root@localhost:~# sudo apt-get install git
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  git-man liberror-perl
Suggested packages:
  git-daemon-run git-daemon-sysvinit git-doc git-el git-arch git-cvs git-svn git-email git-gui gitk gitweb
The following NEW packages will be installed:
  git git-man liberror-perl
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 6,741 kB of archives.
After this operation, 15.2 MB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 https://us.archive.ubuntu.com/ubuntu/ precise/main liberror-perl all 0.17-1 [23.8 kB]
Get:2 https://us.archive.ubuntu.com/ubuntu/ precise/main git-man all 1:1.7.9.5-1 [630 kB]
Get:3 https://us.archive.ubuntu.com/ubuntu/ precise/main git amd64 1:1.7.9.5-1 [6,087 kB]
Fetched 6,741 kB in 3s (1,846 kB/s)
Selecting previously unselected package liberror-perl.
(Reading database ... 21183 files and directories currently installed.)
Unpacking liberror-perl (from .../liberror-perl_0.17-1_all.deb) ...
Selecting previously unselected package git-man.
Unpacking git-man (from .../git-man_1%3a1.7.9.5-1_all.deb) ...
Selecting previously unselected package git.
Unpacking git (from .../git_1%3a1.7.9.5-1_amd64.deb) ...
Processing triggers for man-db ...
Setting up liberror-perl (0.17-1) ...
Setting up git-man (1:1.7.9.5-1) ...
Setting up git (1:1.7.9.5-1) ...

Now that “git” is installed, let’s login as the gitolite user, via the root account….

root@localhost:~# sudo su - gitolite

…and download the “gitolite” installation files.

gitolite@localhost:~$ git clone git://github.com/sitaramc/gitolite
Cloning into 'gitolite'...
remote: Counting objects: 7472, done.
remote: Compressing objects: 100% (2464/2464), done.
remote: Total 7472 (delta 5120), reused 7200 (delta 4883)
Receiving objects: 100% (7472/7472), 1.76 MiB | 1.23 MiB/s, done.
Resolving deltas: 100% (5120/5120), done.

We will install it in the gitolite user’s home directory under “~/bin”, so we first create this directory…

gitolite@localhost:~$ mkdir bin

Now run the install…

gitolite@localhost:~$ gitolite/install -to /home/gitolite/bin

We’re not there yet. This “install” actually only installed the command-line tool that we will use to setup our gitolite server.

So, let’s run that command-line tool to setup our gitolite server, giving it the public key that we uploaded, called “gitolite.pub”.

gitolite@localhost:~$ /home/gitolite/bin/gitolite setup -pk gitolite.pub
Initialized empty Git repository in /home/gitolite/repositories/gitolite-admin.git/
Initialized empty Git repository in /home/gitolite/repositories/testing.git/
WARNING: /home/gitolite/.ssh missing; creating a new one
WARNING: /home/gitolite/.ssh/authorized_keys missing; creating a new one

Logout of the gitolite user….

gitolite@localhost:~$ exit
logout

…and exit the machine.

root@localhost:~# exit
logout
Connection to 66.175.220.39 closed.

Reduce carpal tunnel by 20%!

Just to make it easy to we are going to give our machine an ssh alias, by adding some config under our ~/.ssh directory.

Edit (or create) ~/.ssh/config

phil@air:~
$ vim ~/.ssh/config

and add the following lines…

Host gitbox
   User gitolite
   Hostname 66.175.220.39
   Port 22
   IdentityFile ~/.ssh/gitolite

The IP is specific to my install, so you will want to change that.

Take control

With gitolite, the way we manage repositories, users and access-rights is via a git repository. I love this fact. Git controlling git.

Let’s download the gitolite-admin from our newly created git repository.

phil@air:~
$ git clone gitbox:gitolite-admin
Cloning into gitolite-admin...
remote: Counting objects: 6, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 6 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (6/6), done.

What do we have here?

Let’s take a look in the repository…

phil@air:~
$ cd gitolite-admin/
phil@air:~/gitolite-admin (master)
$ ls -l
total 0
drwxr-xr-x  3 phil  staff  102 23 Jul 20:22 keydir
drwxr-xr-x  3 phil  staff  102 23 Jul 20:22 conf

Everyone gets a key

“keydir” is where store our user’s keys. Currently, you will see a gitolite.pub file in there. That is the “gitolite” user we use to administrate our gitolite installation.

Let’s create a new gitolite user called “phil” by copying phil’s public key into the “keydir” directory. You can create the key-pair for this user, just as you did for the gitolite user at the top of this post.

phil@air:~/gitolite-admin (master)
$ cp ~/.ssh/phil_rsa.pub keydir/phil.pub
phil@air:~/gitolite-admin (master)
$ git add keydir/phil.pub
phil@air:~/gitolite-admin (master)
$ git commit -m 'added user "phil" to gitolite'
[master d595439] added user "phil" to gitolite
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 keydir/phil.pub
phil@air:~/gitolite-admin (master)

Pushing to our remote machine will create that user.

$ git push
Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 714 bytes, done.
Total 4 (delta 0), reused 0 (delta 0)
To gitbox:gitolite-admin
   7f266e0..d595439  master -> master

Privileges

Under the “conf” directory you will find “conf/gitolite.conf” which controls which repositories are available on the system and who has which rights to those repositories.

Let’s edit that file with vim…

phil@air:~/gitolite-admin (master)
$ vim conf/gitolite.conf

…and add the groups “@admin” and “@staff” and a new repository called “bigfastblog”.

 @admin      = phil
 @staff      = phil

 repo gitolite-admin
     RW+     = gitolite @admin

 repo testing
     RW+     = @all

 repo bigfastblog
     RW+     = phil @admin
     R       = @staff

As you can see, anyone in our @staff group has read-only privileges to the new “bigfastblog” git repository, but only “phil” and users we add to the @admin group will be able to git-push to that repository.

phil@air:~/gitolite-admin (master)
$ git commit conf/gitolite.conf -m 'added "bigfastblog" repo'
[master 357bbc8] added "bigfastblog" repo
 1 files changed, 9 insertions(+), 1 deletions(-)

When we “git push” our changes to this configuration back to our gitolite server, we can actually see in the dialog that the “bigfastblog” git repository is being created.

phil@air:~/gitolite-admin (master)
$ git push
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 428 bytes, done.
Total 4 (delta 0), reused 0 (delta 0)
remote: Initialized empty Git repository in /home/gitolite/repositories/bigfastblog.git/
To gitbox:gitolite-admin
   d595439..357bbc8  master -> master

I hope that gives you a good overview of how to install gitolite. If you found this helpful, please subscribe to this blog or follow me on twitter @philwhln.

Comments

  1. Dakiss

    Good tutorial, clear, effective. Thank you!

  2. Roger Ivy

    Thanks for this Phil … I’m testing it end-2-end.

    In the initial hardware section, where you wrote “fresh install of “Ubuntu 12.04 LTS 64bit” with root user setup and ssh access to the root user via password”

    I was under the impression that Ubuntu only gives you access to root via “sudo”, that you can’t actually be “root”. Did you set up your initial user as “root”?

    …or did you do something like this:
    sudo passwd
    Password:
    Enter new UNIX password:
    Retype new UNIX password:

  3. Warren Le

    “You used a key that is already set to give you shell access. You cannot use the same key to get shell access as well as access gitolite repos.” (https://sitaramc.github.com/gitolite/emergencies.html#ce)

    In our case is ‘sudo mv gitolite.pub /home/gitolite’
    and ‘/home/gitolite/bin/gitolite setup -pk gitolite.pub’

    Which means we used gitolite.pub to get shell access and access to gitolite repos as well.

  4. Sitaram Chamarty

    Phil,

    That’s a very nice and clearly written blog post.

    But the reason I am writing is this: I can’t tell you how much I appreciate the deprecation notice at the top of your older (2010 or so) blog post on this.

    In contrast, I had to badger the owner of a then-popular (but already long obsolete) blogpost on gitosis for a few months before he finally relented and put in a very weak disclaimer. Luckily it’s no longer among the top hits and we no longer get as many people on #git asking for help because they followed that blog and something went wrong.

    So… thanks again for making my life easier.

    regards,

    sitaram

  5. Joey

    Nice and Superb Gitolite tutorial!

  6. jakkudanieru

    No ssh-add ~/.ssh/gitolite.pub ?
    Kind of stuff that save people time isn’t it?

  7. bfn

    I’ve followed the steps, but ssh asks me for a password:

    $ git clone myserver:gitolite-admin
    Cloning into ‘gitolite-admin’…
    [email protected]‘s password:

    I never set a password, and if I press “Enter”, it says “Permission denied, please try again”. Any idea? The server is on Debian Squeeze, and the local machine on Ubuntu 12.04.

  8. Geoff Ford

    Thank you very much for this awesome tutorial. The only one I have found that takes you right through the process and actually works at the end!!

    I would just like to add an additional step for anyone wanting to add new users on other workstations as it took me a while to get this bit working correctly (i.e. not asking for a password).

    *Firstly create your keys on the new users machine.
    *Then copy the public key to the keydir folder of the gitolite-admin repo on whichever machine you set up the above steps to administer gitolite from and commit your changes as described above.
    *On the same admin machine edit the conf/gitolite.conf to add your user wherever required and commit your changes again.

    Now it was at this point I ran into problems when trying to clone a repo on to my new user’s machine. I kept getting a prompt for a password for my new user. The solution was to create the following .ssh/config file on the new user’s machine:

    Host gitbox
    Hostname your_hostname_here
    User gitolite
    Port 22
    IdentityFile ~/.ssh/new_user_key

    Note that whilst you still use the new user’s private key in IdentityFile, the magic comes from entering gitolite as the User as it is this username that is used to make the ssh connection that then passes the new_user_key for authentication. This works because when new users are added to gitolite-admin, the public keys are added as additional keys to the gitolite user on the server in .ssh/authorized_keys.

    You can now clone a remote repo to the new user’s machine with the following:

    git clone gitbox:your_repo_name

    Hope that saves a bit of someone’s time :-)

    Thanks

    Geoff.

    1. Javier

      Hi,
      I see the message “remote: Initialized empty Git repository in /home/gitolite/repositories/bigfastblog.git/”
      But… when I my local machine I try to clone this not works :(
      $git clone gitbox:bigfastblog
      ======
      FATAL: R any bigfastblog gitolite DENIED by fallthru
      (or you mis-spelled the reponame)
      fatal: The remote end hung up unexpectedly
      ======

      Ok… In
      vim ~/.ssh/config
      I need add
      @admin = gitolite

      And now works :S

    2. silviu

      thnx alot guys,
      the top quality tutorial from phil and your hint,geoff, saved my day.

      cheers

  9. Fredrik

    Great tutorial! Usually you face some sort of a obstacle following a tutorial, but here everything just worked flawless and you also explained each steps very well. I usually do not reply on tutorials (which i guess is somewhat rude, but here i had to make an exception) Thanks alot!

  10. Oguz Meteer

    Hi Phil,

    Thanks for the clear tutorial. However I’m having some difficulty installing gitolite. The step where you have to execute:

    gitolite/install -to /path/to/home/directory/of/user/gitolite

    gives me a “Permission denied” error. I have not created the gitolite home directory in /home/gitolite, because I’m running a RAID5 mirror on my server, and wanted to place the home directory there. Since I used sudo su – gitolite, I would not have expected this error. Any clues?

  11. chelifero

    Thanks Phil for this tutorial!!!
    But…
    I want use the same user account to admin gitolite and collaborate, so in my machine I’ve the gitolite-admin folder with this conf/gitolite.conf file:

    @admin = user1
    @staff = user1

    repo gitolite-admin
    RW+ = gitolite @admin

    repo testing
    RW+ = @all

    repo test_repository
    RW+ = user1 @admin
    R = @staff

    and this ~/.ssh/config file:

    Host gitbox
    Hostname remote_repo_ip_address
    User gitolite
    Port 22
    IdentityFile ~/.ssh/user1

    When I try to push conf/gitolite.conf file changes, I see at terminal:

    user1@machine1 ~/gitolite-admin $ git push
    FATAL: W any gitolite-admin user1 DENIED by fallthru
    (or you mis-spelled the reponame)

    Instead if I modify ~/.ssh/config file in this way:

    Host gitbox
    Hostname remote_repo_ip_address
    User gitolite
    Port 22
    IdentityFile ~/.ssh/gitolite

    Push is ok, but I can’t work with git as user1. I can’t switch between these file version of file for working.
    What am I doing wrong? Is that possible?

  12. Joe

    Great stuff – explains a lot of what’s happening when trying to access your git repos via gitolite.

    I need some guidance on the ssh side of things.

    I’ve installed Gitolite and Gitlab 5.0 (Mac OS X Mountain Lion Server – 10.8)
    I can see the Gitlab page just fine – and can add and create users, projects, etc. I can then look on the machine under the repositories and satellites directory and see everything is there hunky-dorey….

    The problem is when I try to clone down up push/pull up to a rego. I can not connect for the life of me – and I’m sure it has something to do with how SSH is either configured or what the git account is being set up as when trying to grab from a repo.

    For instance when I do: ssh [email protected] (that’s the gitolite machine), I get:

    PTY allocation request failed on channel 0

    (that’s when on the machine and doing it locally – when on another machine and doing that command – I get in).

    Now, this is different than what I should get. I should get a listing of what repos are allowed with their RW+, etc settings.

    I even try : ssh [email protected] info

    info: Writing node (dir)Top…
    info: Done.
    File: dir Node: Top This is the top of the INFO tree
    This (the Directory node) gives a menu of major topics.
    Typing “d” returns here, “q” exits, “?” lists all INFO commands, “h”
    gives a primer for first-timers, “mEmacs” visits the Emacs topic,
    etc…

    (and a whole lot of stuff about emacs, etc)…

    Logically, I should get the access rites for repos to Gitolite again – doesn’t happen.

    Then, the coup d’etat:

    www:temp git$ git clone [email protected]:gitolite-admin
    Cloning into ‘gitolite-admin’…
    fatal: ‘gitolite-admin’ does not appear to be a git repository
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.

    And yes, gitolite-admin is there, and I can pull it down via:

    git clone [email protected]:repositories/gitolite-admin

    But many sites mention that this is the WRONG way to do this since it bypasses Gitolite then – and yes, that is proven in that after pulling it down that way, I can’t push anything up – too numerous errors to describe.

    So, my question is this: how do I get SSH on this machine to be setup correctly, etc?

    I have my .bashrc configured as such (and I know this is what’s called when I do that ssh call):

    www:~ git$ more .bashrc
    export GIT_EXEC_PATH=/usr/libexec/git-core

    PATH=$HOME/.rvm/bin:$HOME/gitolite/src:$HOME/bin:$PATH # Add RVM to PATH for scripting

    Any pointers or help would be fantastic.

    Thanks.

    Joe…

  13. Lionel Abderemane

    It is really clear Thank you

  14. D Israel

    This is great! However, I think I’m a little unclear about something.

    You create a key for each user, but how does gitolite know which user you are? Do I have to do something else there?

    Thanks again for this.

  15. D Israel

    Oh oh. Is that what the comment (above) from Geoff Ford is about? Just replace the Identity file with the newly created private key (User remains gitolite)?

    Thanks.

  16. Geoff Ford

    ;-)

  17. Ovidiu Visan

    Thank you very much for this tutorial. It worked great!

  18. Amit Dixit

    I did exactly the same as Geoff Ford described to add new user with new workstation.

    My .ssh/config file was as below:

    Host gitbox
    User gitolite
    Hostname new_host_ip
    Port 22
    IdentityFile ~/.ssh/new_user

    But every time it’s ask for password of gitolite user on my machine.
    gitolite@new_host_ip’s password:

    But once I changed the hostname to gitbox, it works fine. The changes I made is as:

    Host gitbox
    User gitolite
    Hostname gitbox
    Port 22
    IdentityFile ~/.ssh/new_user

    I believe hostname should be our local machine or new host that need to add, Can anyone explain to me why it’s happened.

    Thanks,
    Amit Dixit

  19. chinmay hundekari

    Thanks a lot for this article.. I finally managed to set up gitolite.

    But I am not able to commit into a new repository. I added a line in gitolite.conf and i was able to push it and creat a blank repo.
    But then when i try to push with the below command it asks for my password. and i am not able to proceed forward. I am not asked a password while doing a commit on gitolite repository.

    git push –all git@ubuntu3:ABCD

    ubuntu3 is hostname. and ABCD is the repository.

  20. Josivan Souza

    After create a repository following your blog. How can I clone it from a windows wosktation.

    Thanks

  21. Ido

    Hi Phil,

    I followed your blog (Which is great BTW) but I still face permission problem when I try:

    Idos-MacBook-Air:~ idofishler$ git clone amazongit:gitolite-admin.git
    Cloning into ‘gitolite-admin’…
    FATAL: R any gitolite-admin amazongit DENIED by fallthru
    (or you mis-spelled the reponame)
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.

    I using an EC2 instance – so I suspect something to do with amazon restriction? Any idea about that?

    BR,
    Ido

    1. Ido

      I was able to solve this!

      I soon found that the user you login with let’s call it ‘git’ and the key file name – must be identical.
      In addition I had to edit the /home/git/.gitolite/conf/gitolite.conf file to add add the the user ‘git’ permissions on this gitolite-admin repository. Now it look like so:

      repo gitolite-admin
      RW+ = git

      repo testing
      RW+ = @all

      I also deleted all the other keys form /home/git/.gitolite/keydir
      Then run ‘/home/git/bin/gitolite setup again.

      Thanks again for this wonderful blog post!

  22. Shuaib

    Hi Phil,

    What’s the recommended setup when you want to host the repositories
    directory somewhere other than /home/git on your server?

    Thanks!

  23. Eshwar

    Phil,

    I followed through your article, but i couldn’t clone gitolite:admin repo.
    I have created a user called ‘gitolitee’ as the user ‘gitolite’ is reserved.

    i have created gitolitee & gitolitee.pub and copied to server through
    scp .ssh/gitolitee.pub gitolitee@ubutu:

    then i cloned the repo and installed it. But when i clone admin repo in local machine it is asked for password.

    Could you help me in this.

  24. Mehran

    Hey phil when i run this command.
    git clone gitbox:myserver

    system asks for
    gitosis:myserver’s password:

    I dont know which password …is it password of my server. I tried but it didnot worked.

  25. Shlomit

    Hi,

    Your tutorial is so clear – Thanks,

    I feel something missing or I don’t understand something.
    I have git install and now I add installation of gitolite.
    How git know to go through gitolite?

    Thanks again for this wonderful tutorial.

  26. Shlomit

    It’s me again,
    I saw that even that I change the file conf/gitolite.conf and I run ‘gitolite setup’, when I run ssh to the git server I got the basic conf that came with the gitolite installation.
    How can I refresh the conf file?

    Thanka a lot.

  27. hopsj

    Hello and thank you for your tutorial. One suggestion that may help make things more clear is to use usernames that are not exactly the same as the name of the program. It can be hard for noobs such as myself to interpret the meaning of ‘gitolite’ especially when it appears 4 times in the same command (username, directory, file?) I found Sitaram’s own tutorials to be difficult to follow for this reason as well. I would suggest something like gitadmin to refer to the gitolite user, and real-world names such as bob to refer to individual users.

  28. yewin

    Hi Phil,

    Thank you for your wonderful tutorial.

    But I feel little wrong in my workstation.

    I setting up gitolite server on linux and clone from eclipse windows.
    So I generate SSH key from elipse from windows side.
    Windows > Preferences > General > Network Connections > SSH 2 > Key Management > Generate RSA Key.
    I change the public key name “bob.pub” and copy to my linux server.

    And then I follow the “Everyone gets a key” section as the end of post.
    But I always face the following errors.

    ssh://[email protected]:22/home/gitolite/repositories/foo.git FATAL: R home/gitolite/repositories/foo bob DENIED by fallthru.(or miss-spelled the repo name)

    I try the numerous repository path.:
    git+ssh://[email protected]:22/foo
    git+ssh://[email protected]:22/foo.git

    It not work and still errors.
    Any suggestion about that??
    I always appreciate your suggestion.

    Thank Again.
    yewin

  29. rballen

    Thanks man! I’ve spent hours going round and round trying to install gitolite. Then I found your article 20 minutes ago and now my pi gitbox is finally working perfectly. Awesome!

  30. Maciej Cygan

    Hello Phil

    I have tested this and it works great. However !
    I am now trying to integrate Gitolite with Redmine and its a pain in the ass and i can not get it to work .. is there a chance that you could amend this / or create new tutorial to show how to integrate gitolite with redmine ? I would really appreciate it !!

    Thanks