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.
Good tutorial, clear, effective. Thank you!
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:
Hi Roger,
That “root” user is a Linode thing. When you fire-up a new machine you can set the root password before you boot the machine. So, yes, you login via the “root” user. I did not actually do anything myself to get into this position. I know AWS AMI images for Ubuntu generally do not allow you to login via as root, so I hope this does not cause too much confusion.
For AWS, simply replace “root” for “ubuntu” (or the username you have on the machine) and when you run commands as that user (and only that user), ensure that you have them prefixed with “sudo”.
Hope that helps.
[AWS = Amazon Web Services]
I’ve updated the post, so you will only have replace “root” with “ubuntu” (or the username you have on the machine) and everything should work. Let me know if you hit any issues.
“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.
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
Nice and Superb Gitolite tutorial!
No ssh-add ~/.ssh/gitolite.pub ?
Kind of stuff that save people time isn’t it?
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.
Hi Bfn,
If you are seeing the password prompt, then this indicates that the ssh keys is not setup correctly, so it is falling back to password authentication. Maybe you missed a step?
Thanks,
Phil
This was a problem in the /etc/ssh/sshd_config file, I added “gitolite” user after the AllowUsers directive, and now this is ok
(cf: https://sitaramc.github.com/gitolite/sts.html#stsapp1 )
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.
Hi Geoff,
Thanks for the great feedback! Sorry you hit problems with this. The post did not go as far as checking out the repositories for added users, so I think your advice will be a great help to anyone reading this post.
Thanks,
Phil
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
thnx alot guys,
the top quality tutorial from phil and your hint,geoff, saved my day.
cheers
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!
Thanks Fredrik! Glad you found it useful. Please tweet or share on your favorite social network, so that others more easily find it.
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?
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?
Hi Chelifero,
gitolite.conf looks ok to me.
Do you have a key for that user? You should have this file ~/gitolite-admin/keydir/user1.pub which will be the public key of the user1 user.
user1 cannot push the user1.pub key for the gitolite-admin repo, or add itself as an admin, but it sounds as though you done that with the gitolite user (at least the gitolite.conf part).
cp ~/.ssh/user1.pub ~/gitolite-admin/keydir/user1.pub
cd ~/gitolite-admin
git add keydir/user1.pub
git commit -m ‘added pub key for user1′
git push
Now you should be able to edit the IdentityFile of User gitolite in .ssh/config to point to ~/.ssh/user1
Hi Phil,
thanks for your answer
I’ve already done staging, commit and push the pub key for the user1. I see that with the command git log in user1 pc and I see the key file in /home/gitolite on the remote pc…
What do you think about permission of /home/gitolite/user1.pub file on the remote pc? I seek:
chown gitolite:gitolite /home/gitolite/user1.pub
… and …
chown user1:user1 /home/gitolite/user1.pub
but not change the result.
Maybe try posting your issue to Gitolite mailing list…
https://groups.google.com/forum/?fromgroups=#!forum/gitolite
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…
It is really clear Thank you
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.
It knows based on which ssh key you authenticate with.
I’m new to these key settings. Does this mean I change my ssh config file to the new username and identity file ? I didn’t see where you made that change.
Thanks again.
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.
Thank you very much for this tutorial. It worked great!
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
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.
After create a repository following your blog. How can I clone it from a windows wosktation.
Thanks
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
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!
Great! Glad you solved it Ido. Thanks for also posting the resolution! I just got back from a trip to Japan, so was not up-to-date with comments.
Hi Phil,
What’s the recommended setup when you want to host the repositories
directory somewhere other than /home/git on your server?
Thanks!
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.
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.
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.
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.
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.
Thanks! That’s great feedback and will keep it in mind for future posts.
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
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!
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