wasil.org Abandon the search for Truth; settle for a good fantasy

20Dec/1149

GitLab installation on Fedora 16 (with gitolite)

No Gravatar
This is updated ver­sion of my tuto­r­ial for Git­Lab 2.1. Old ver­sion can be found here

Atten­tion: this guide seri­ously out­dated! It has been writ­ten for Git­lab v2.1 and cur­rent ver­sion is >= v7.1.1. Almost every­thing has changed since then.

Git­Lab is a won­der­ful piece of soft­ware made by these guys and I’d like to try and install it on Fedora 16 sys­tem, as it is most recent Fedora OS at the time I am writ­nig this. I will base my tuto­r­ial on on found here by Déja. Also on my way to suc­cess­ful install I’ve stum­bled upon this descrip­tion, so I might have gain some expe­ri­ence from it too.

Git­Lab is Ruby on Rails appli­ca­tion and it takes some expe­ri­ence to get it all work­ing because of many, many, many depen­den­cies and pack­ages it needs. It’s noth­ing like sim­ple PHP on Apache instal­la­tion. But it works and it’s worth it, I assure you :)

Let’s begin! (by the way: I per­form all as root user — again: test environment)

small edit: For peo­ple who only want this to work and not nec­es­sar­ily wish to know how and why, I have pre­pared easy instal­la­tion scripts in here
another EDIT: Git­Lab is under heavy devel­op­ment and now it’s sta­ble ver­sion is 2.1. This means that my guide might be not entirely accu­rate. Please be cau­tious. I’ll update it soon.
  1. First of all: I am work­ing on vir­tual machine with brand new and fresh Fedora 16 installed. Min­i­mal instal­la­tion, just to make sure noth­ing messes with Git­Lab. Con­sider this a test environment.
  2. Once you have your OS ready, update it with yum update and also install some pack­ages you will need on the way:
    yum install make openssh-clients gcc libxml2 libxml2-devel \
    libxslt libxslt-devel python-devel
  3. Check what ver­sion of ruby is avail­able via yum. Git­Lab needs at least ver­sion 1.9.2
    yum info ruby

    on mine it says that the only avail­able ver­sion for me is 1.8.7.357 so I have to get it some­where else.

  4. Using RVM to install Ruby.
    EDIT: I have switched to ruby 1.9.3p0 — it works and starts a lot faster, you can use it instead of 1.9.2-p290 in this guide.

    I will use RVM, which stands for Ruby Ver­sion Man­ager — bril­liant tool, which you can use to install and man­age your Ruby with ease. Let’s check it out, shall we? (you can install Ruby any way you want — I’ll just do this RVM way)

    Notice use of –with-openssl switch — with­out that pas­sen­ger will com­plain about Ruby OpenSSL sup­port and won’t com­pile in next step.

    sudo bash -s stable < <(curl -sk https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
    
    source /etc/profile.d/rvm.sh
    
    rvm install ruby-1.9.2-p290 --with-openssl
    
    rvm use ruby-1.9.2-p290 --default
    

    Done. Just like that we have oper­a­tional Ruby 1.9.2-p290. No RPMs, no going back in time.. nice, huh? :)

  5. Good. Small (nice) sur­prise: our RPM installed ruby gems for us, so now we only have to get rails gem.
    first, just to make sure every­thing is up to date, execute:
    rvm all do gem update --system

    now install rails with:

    rvm all do gem install rails
  6. Now we will install apache2 as a web­server and Pas­sen­ger for ruby apps deploy­ment. I know that most Git­Lab tuto­ri­als use nginx but I really like apache ;)
    yum install -y httpd
    rvm all do gem install passenger

    as I men­tioned: I use apache, so I will need pas­sen­ger mod­ule for it:
    first some required packages:

    yum install -y gcc-c++ curl-devel openssl-devel zlib-devel \
    httpd-devel apr-devel apr-util-devel

    an then use

    passenger-install-apache2-module

    in order to install it.it gives you 2 infor­ma­tion on how to pro­ceed with apache configuration:

    • add fol­low­ing lines to /etc/httpd/conf/httpd.conf (at the very end):
      LoadModule passenger_module /usr/lib/ruby/gems/1.9.1/gems/passenger-3.0.11/ext/apache2/mod_passenger.so
      PassengerRoot /usr/lib/ruby/gems/1.9.1/gems/passenger-3.0.11
      PassengerRuby /usr/bin/ruby
      
    • and then cre­ate file named default.conf (or gitlab.conf, or some­thing other you like) in /etc/httpd/conf.d/ con­tain­ing these lines (remem­ber to change to fit your environment):
      <VirtualHost *:80>
      ServerName www.yourhost.com
      DocumentRoot /somewhere/public
      <Directory /somewhere/public>
      AllowOverride all
      Options -MultiViews
      </Directory>
      </VirtualHost>
      

      (don’t worry, we’ll come back to this one later)

  7. Now it is time for gito­lite. I won’t use gito­sis because it is not actively devel­oped any more and I found that new Git­Lab works bet­ter with gitolite.install it with
    yum install -y gitolite

    now, wasn’t that quick? :)

  8. Now we will need to cre­ate new gito­lite server con­fig­u­ra­tion and in order to do that we have to gen­er­ate SSH key-pair. But first things first.
    To get us started we will cre­ate git user with

    adduser -r -m --shell /bin/bash \
     --comment 'git version control' git
    mkdir /home/git/.ssh
    chown git:git -R /home/git/.ssh
    

    Now we have to cre­ate SSH keys pair for him:

    ssh-keygen -q -o -N '' -t rsa -f /home/git/.ssh/id_rsa

    To ini­tial­ize Gito­lite we need to first edit it’s default con­fig­u­ra­tion file and change default per­mis­sions and then ini­tial­ize it by using git user:

    sed -i 's/0077/0007/g' /usr/share/gitolite/conf/example.gitolite.rc
    
    su - git -c "gl-setup -q /home/git/.ssh/id_rsa.pub"

    as men­tioned here

  9. Just to make sure that git user has all nec­es­sary access rights to his own home direc­tory after we have added SSH keys for him:
    chown git:git -R /home/git/
  10. OK, time for next require­ments: python Pip, I will go with method from orig­i­nal post and NOT use yum for that.
    curl http://python-distribute.org/distribute_setup.py | python
    

    and then

    easy_install pip
    
  11. Data­base. We need it. We have it already — it was installed on the way as a depen­dency. Just to make sure check if you have SQLite at list ver­sion 3.6 with:
    yum info sqlite

    I have 3.7.7.1. All we need is SQLite devel­op­ment pack­age, get it with:

    yum install -y sqlite-devel
  12. And now the main event! GitLabHQ!

    I like install web apps in /var/www so we will go there and git clone GitLab:

    cd /var/www
    
    git clone git://github.com/gitlabhq/gitlabhq.git
    
    cd gitlabhq/
    

    we need to use pip to install some python dependencies:

    pip install pygments

    and bundler gem so it can later on do most of the work for us:

    rvm all do gem install bundler

    you will need one more depen­dency for bun­dle install

    yum install -y libicu-devel

    finally (remem­ber to be in Git­Lab direc­tory):

    bundle install

    (go get your­self a cof­fee or other treat — it takes a while)

  13. Redis instal­la­tion. More about Redis here
    yum install -y redis

    and start it with:

    service redis start
    
  14. Prepar­ing con­fig files.copy data­base and git­lab con­fig files from exam­ple to work­ing copies:
    cp config/gitlab.yml.example config/gitlab.yml
    cp config/database.yml.example config/database.yml
  15. DB setup:
    And now data­base setup and import:
    RAILS_ENV=production rake db:setup
    RAILS_ENV=production rake db:seed_fu
    

    TIP: if you get errors here, check if you don’t have 2 ver­sions of rake installed (I had some­how): 0.8.7 and 0.9.2. If you do, remove older with:

    gem uninstall rake

    and choose appro­pri­ate ver­sion. If you still have prob­lems try:

    gem install rake

    -> don’t know why, but if it installs again same ver­sion of rake, it works.

  16. Apache vir­tual host con­fig­u­ra­tion should look some­thing like this (I told you, we will get back to that):file: /etc/httpd/conf.d/gitlab.conf
    <VirtualHost *:80>
    ServerName www.yourhost.com
    DocumentRoot /var/www/gitlabhq/public
    <Directory /var/www/gitlabhq/public>
    AllowOverride all
    Options -MultiViews
    </Directory>
    </VirtualHost>
    
  17. enable apache user, co you can su into this account:
    usermod -s /bin/bash -d /var/www/ apache

    pre­pare SSH key for him (actu­ally use one cre­ated for git user)

    mkdir /var/www/.ssh
    
    cp -f /home/git/.ssh/id_rsa /var/www/.ssh/ && chown apache:apache /var/www/.ssh/id_rsa && chmod 600 /var/www/.ssh/id_rsa
    

    add local­host to apache user known_hosts with:

    ssh-keyscan localhost >> /var/www/.ssh/known_hosts

    also give him per­mis­sions to his own home direc­tory with:

    chown -R apache:apache /var/www/

     

  18. add apache user to git group with:
    usermod -a -G git apache
  19. check if repos­i­to­ries direc­tory has cor­rect per­mis­sions, it should be 770. You can set it with
    chmod 770 /home/git/repositories/
  20. dou­ble check your fire­wall (for exam­ple ipt­a­bles) if it allows con­nec­tions on port 80 to your server.
  21. impor­tant: Apache won’t be able o start with SELinux set to “enforc­ing”. Please set it to permissive.
  22. start apache server with:
    service httpd start
  23. Now it all should work. Fin­gers crossed.. go to http://www.yourhost.com
  24. Now you should be able to log in using these cre­den­tials:

    user: admin@local.host
    pass: 5iveL!fe

    and you’re in :)

It wasn’t so hard, wasn’t it? ;)

Trou­bleshoot­ing:

  1. I get error 500 when I enter par­tic­u­lar project and try to get into it’s “Admin” sec­tion. Don’t know how to fix it yet.To fix it, check if repos­i­to­ries direc­tory has cor­rect per­mis­sions, it should be 770. You can set it with
    chmod 770 /home/git/repositories

    also set this:

    chmod 770 /home/git
  2. If Pas­sen­ger insists, that we don’t have or he can’t see grit library (gem actu­ally, as far as I know) even though we have it.

    https://github.com/gitlabhq/grit.git (at mas­ter) is not checked out. Please run ‘bun­dle install‘ (Bundler::GitError)

    Only res­o­lu­tion to this prob­lem I have found is to (as root) change /usr/local/rvm/gems/ruby-1.9.3-p0/gems own­er­ship to apache user with:

    chown apache:root -R /usr/local/rvm/gems/ruby-1.9.3-p0/gems

    I know that is not great res­o­lu­tion but it worked for me. If you’ll hap­pen to know bet­ter way — please let me know, so I can update this tuto­r­ial and my knowl­edge of course ;)

    Edit

    I found another solu­tion (instead of chang­ing per­mis­sions): after first

    bundle install

    edit Gem­file and in lines con­tain­ing “git:” remove every­thing after first comma, for example:

    gem "grit", :git => "https://github.com/gitlabhq/grit.git"

    should be

    gem "grit"

    and so on.

    then do again

    bundle install

    and now pas­sen­ger shouldn’t com­plain any more.

Be Socia­ble, Share!
    Comments (49) Trackbacks (2)
    1. Wish this was easy to install, don’t know how many hours i spent try­ing to get git­lab to work before i gave up :/

      • Hi!
        Have you tried doing it fol­low­ing my tuto­r­ial or have you just tried to install it on your own and it took so much time? Maybe I can help somehow? :)

    2. get this error on bun­dle install http://pastebin.com/ZBDCeeVp
      have centos5

      yum list installed |grep sqlite
      python-sqlite.x86_64 1.1.7–1.2.1 installed
      ruby-sqlite3.x86_64 1.1.0–6.el5 installed
      sqlite.i386 3.3.6–2 installed
      sqlite.x86_64 3.3.6–2 installed
      sqlite.i386 3.3.6–5 installed
      sqlite.x86_64 3.3.6–5 installed
      sqlite-devel.i386 3.3.6–5 installed
      sqlite-devel.x86_64 3.3.6–5 installed

    3. I’ve done every­thing on this page.
      but I can’t see any­thing when I access the server via browser besides 403 error.

      I’ve found there’s no index.html in gitlabhq/public so I made dummy and I don’t see 403 any­more. but all I can see is dummy page that I made.

      what should I do more to see that “Git Lab web interface”?

      • I’m not sure what you set-up is, but there shouldn’t be any index.html in pub­lic direc­tory. Can you please try post­ing your Apache error and access log right after you get 403 error? Only lines cor­re­spond­ing needed.
        Also please dou­ble check you Apache vir­tu­al­host con­fig­u­ra­tion. You know: paths and all.

    4. Hi!

      First of all, thank you for tuto­r­ial. Now, every­thing is work­ing but I can’t add ssh key, I can’t add projects. Can you please advise me on how to continue?

      Thank you!

      • Hi,
        Please check fol­low­ing things:
        1. is your Apache user has local­host added in his .ssh/known_hosts
        2. does your Apache user can log into gito­lite account with­out pass­word (his pri­vate key is work­ing with pub­lic key added to gito­lite user authorized_keys via gito­lite)
        3. does direc­tory /var/lib/gitolite/repositories/ have 770 per­mis­sions?
        4. is Apache user in gito­lite group?

        I’ll think of some­thing else as soon as you’ll check if those things worked or not :)

        • Hi Piotrek,

          Yes, all 4 points are accom­plished.
          As apache:
          –bash-4.1$ ssh gitolite@localhost
          PTY allo­ca­tion request failed on chan­nel 0
          the gito­lite con­fig gives you the fol­low­ing access:el6
          R W gitolite-admin
          @R_ @W_ test­ing
          Con­nec­tion to local­host closed.

          I don’t under­stand why adding a ssh key is required and also, I can’t find a proper doc­u­men­ta­tion about gitolite.conf where I think it might also be a problem.

          Thank you for your help!
          Narcis

          • Hi,
            SSH key is needed because this is how any user is authen­ti­cat­ing with gito­lite. All actions like adding SSH key or repos­i­tory via Git­Lab inter­face rely on this authen­ti­ca­tion, so Apache user has to have abil­ity to con­nect with­out pass­word. Adding ‘local­host’ to known_hosts pre­vents SSH to ask to accept this host per­ma­nently — you can see how it works every time you try to con­nect to any host for the first time. You just have to do it once.

            Please check if your con­fig­u­ra­tion in /var/www/gitlabhq/config/gitlab.yml is cor­rect: please check host­name, git user (gito­lite) and path to repos­i­to­ries. If you have typed there other host­name then ‘local­host’, for exam­ple my-domain.com — you should su — to apache user and SSH to this host too. Same thing as I described ear­lier with accept­ing new host to known_hosts.

            Also you might want to check log files right after try­ing to add SSH key via Git­Lab:
            – apache error log
            – /var/www/gitlabhq/log/production.log

            Please note, that apache user with his SSH key has to have admin rights (RW) for gitolite-admin repo in order to man­age access by adding SSH keys and repos­i­to­ries entries in gitolite.conf

            As for gitolite.conf doc­u­men­ta­tion, please try here: http://sitaramc.github.com/gitolite/conf.html

            Please let me know if it helped :)

            Piotrek

    5. Hi, and thanks for your tuto­r­ial. I faced the same issue as Nar­cis and man­aged to fix it by clean­ing /tmp/git* (there was a lock file owned by a dif­fer­ent user than apache). See https://groups.google.com/group/gitlabhq/browse_thread/thread/4b21eef9a2e72c25 for details.

      My instal­la­tion was on RHEL 6.1 x86_64, but the con­cept is similar.

      Is there a way to turn on “ver­bose” log­ging for git­lab? production.log just spits out rails log files. There seems to be no “ruby” log file. error_log isn’t much help either.

      • Hi,
        Your res­o­lu­tion to Nar­cis prob­lem might actu­ally work :) thanks for sharing :)

        As for logs.. I didn’t have to increase debug­ging, but try chang­ing config.log_level to :debug (sim­ply uncom­ment­ing) in file: /var/www/gitlabhq/config/environments/production.rb

        If it won’t work please ask about it on Git­Lab page here: https://github.com/gitlabhq/gitlabhq

        Best regards,
        Piotrek

    6. ok, i have it work­ing and kick­ing, but the prob­lem is that when i use
      “admin_uri: gitolite@localhost:gitolite-admin“
      i get error that there is no git repo, but when i change to
      “admin_uri: gitolite@localhost:repositories/gitolite-admin“
      it does work, but i can pub­lish anything =[

      • Hi,
        Sorry for late response — I had a lot to take care of :/ Did you have any luck with your problem?

        By pub­lish you mean cre­ate a new repos­i­tory or push files to one?

        Also, I have trou­ble repro­duc­ing this error so I might need some addi­tional info from you. I don’t really know where to start :/

        Can you add SSH key? Are your paths same in file sys­tem and in con­fig? This might seem stu­pid ques­tion, but typos hap­pen’ to good peo­ple, you know ;)

        Regards,
        Piotrek

        • solved it by adding com­mand=”.….” to autho­rized keys for apache,
          now i have the prob­lem that after any git com­mand i need to make chmod 770 on repos­i­tores direc­tory, the last thing to solve =[

    7. Hi,

      I’ve got error while exe­cut­ing the fol­low­ing step

      RAILS_ENV=production rake db:setup

      error:
      rake aborted!
      Con­nec­tion refused — Unable to con­nect to Redis on 127.0.0.1:6379

      • Hi,
        Sorry to say that, but right now I don’t really know how to help you… You see, when you clone from github, you are cloning bleed­ing edge, newest com­pi­la­tion. This means, that there might be some bugs or it might be messed up com­pletely. I have to update my guide to cover new sta­ble ver­sion 2.1 (stable).

        Sorry for that.

        Right now please look at update guide from 2.0 (my guide) to 2.1 (with Redis) in here: https://github.com/gitlabhq/gitlabhq/wiki/From-2.0-to-2.1

        I’ll update my guide really soon, promise ;)

        Please

        Piotrek

      • You need to install the “redis” RPM and enable/start that ser­vice, like so (on fc17):

        yum install redis
        sys­tem­ctl enable redis.service
        sytem­ctl start redis.service

    8. Thank you very much. You’re awesome !

      My git­labhq is suc­cess­fully installed on freshly installed Fedora 16 and Ruby 1.3.9-p0 (using rvm ’cause I couldn’t find the its spec)

      Only one more thing I had to do to make it works is to install git (“yum install git”) at the beginning.

    9. any help
      Forbidden

      You don’t have per­mis­sion to access / on this server.

      Addi­tion­ally, a 404 Not Found error was encoun­tered while try­ing to use an Error­Doc­u­ment to han­dle the request.
      Apache/2.2.15 (Cen­tOS) Server at 192.168.1.12 Port 80

      • Hi,
        It sounds like you have some prob­lem with Apache vir­tu­al­host con­fig­u­ra­tion, maybe some­thing mis­spelled in direc­tory path? On the other hand you might be point­ing your web­root (/) to either non-exiting folder, folder with per­mis­sions not allow­ing apache user to access it or your vir­tu­al­host con­fig­u­ra­tion is point on wrong direc­tory — I mean, not “pub­lic” in Git­Lab folder.

        Please see what is show­ing in apache logs (access/error) for your vir­tu­al­host — maybe you’ll find a clue there.

        Piotrek

    10. I’m get­ting a 404 when try­ing to add a project, it works some­times and some­times it doesn’t. Seems to be related to files in /tmp. I’ve installed using the new ruby and fol­lowed this how-to to the letter.

      • Hi,
        It might sound obvi­ous, but try clear­ing /tmp folder. It worked for me and I think some­one on Git­Lab sup­port forum as well. Also please check your apache logs for this 404 error and see if there is any info about what exactly is caus­ing it. It might help to check Git­Lab pro­duc­tion log also.

        Piotrek

    11. I’m see this error in the apache error log and can’t fig­ure out what I need to do. I have rerun bunlde install and bun­dle update and it makes no difference.

      Excep­tion PhusionPassenger::UnknownError in PhusionPassenger::Rack::ApplicationSpawner (https://github.com/gitlabhq/gitolite-client.git (at mas­ter) is not checked out. Please run ‘bun­dle install‘ (Bundler::GitError)) (process 1895, thread #):

      • Hi. This is what worked for me: in your Git­Lab direc­tory find file named Gem­file and edit it. Search for lines which have ref­er­ence to pack­age down­load path and dupli­cate them, com­ment out orig­i­nal and delete this ref­er­ence from copy so it will look like all other pack­age entries. There is one for git/grit and 2 or 3 more. You can dis­able them one by one to see which are problematic.

        Good luck :)

        Piotrek

    12. Hi Piotrek,

      you have made a won­der­ful work here. Instal­la­tion went fine.

      When I try to cre­ate a new project I am hav­ing this error:

      Appli­ca­tion cant get access to your gito­lite sys­tem.
      1. Check ‘config/gitlab.yml’ for cor­rect set­tings.
      2. Make sure web server user has access to gito­lite. Setup tuto­r­ial
      3. Try:
      sudo chmod –R 770 /home/git/repositories/
      sudo chown –R git:git /home/git/repositories/

      I do not under­stand how to pro­ceed here. Any thoughts?
      I am run­ning Fedora 15.

    13. Hi,
      Check your file gitlab.yml, which is located in (accord­ing to my tuto­r­ial) in /var/www/gitabhq/config direc­tory. There is line say­ing: host: local­host
      In my instal­la­tion it works for me, but you may have to change ‘local­host’ to your_hostname.

      Direc­tory /home/git/repositories has to be acces­si­ble by Apache user, who should be in ‘git’ sys­tem group. To make it acces­si­ble you have to set direc­tory per­mis­sions, so they will allow that. This is what chmod does. Chown just makes sure that this direc­tory (and sub­di­rec­to­ries) are owned by git user and his group.

      Appli­ca­tion (Git­Lab) is run by Apache user, so you have to make sure that this user can log in via SSH to git user account with SSH key. To check it, please log in as Apache user or if you are root:
      su — apache
      and try com­mand: ssh git@localhost or ssh git@{your_hostname}

      If it suc­ceeds and does not prompt for pass­word, then it is work­ing cor­rectly and I would have to have more details to help you.

      I hope you’ll get it work­ing in no time :)

      Best Regards,
      Piotrek

    14. Would you mind hav­ing a look at this page http://66.84.10.89/

      after more than 20 hours I still cant fig­ure out what’s the problem.

      I’ve tried both your solu­tions with giv­ing rights to apache and “edit Gem­file and in lines con­tain­ing “git:” remove every­thing after first comma, for exam­ple:” but it dont make any difference.

      Thanks

    15. Thanks for writ­ing this up. I started with installing gito­sis and that is work­ing just fine.

      As I am also work­ing with openshift.redhat.com, they use ruby and I am con­cerned that in pulling in the ver­sion of ruby that you’ve described here for git­lab, I don’t want to have to worry about the newer ver­sion not work­ing with openshift.

      I will exper­i­ment with this any­way, and report back here (and on my blog).

      Thanks for doc­u­ment­ing this.

      Har­ish

      • Hi Har­ish,

        Were you able to deploy Git­Lab on Open­shift?, if so may you please share the steps to per­form that deployment?

        Thanks in advance.
        Miguel.

    16. Has any­one ever encoun­tered “unini­tial­ized con­stant Linguist::BlobHelper”. I am doing this on a Media Tem­ple DV4 box which is Cen­tOS 5.

      I did a Google search and some­one else is hav­ing this same prob­lem within the last 24 hours, but they just posted their error anony­mously in paste­bin. You can see their post here: http://pastebin.com/SKrqnEC3

    17. I may also be worth men­tion­ing that if you are doing this in an envi­ron­ment that uses Plesk Panel the only direc­tory and its con­tents that need chown apache:apache is the /var/www/gitlabhq direc­tory. Oth­er­wise, if you fol­low these instruc­tions all your Plesk con­trolled vir­tual hosts will loose their Plesk assigned owner:group permissions.

    18. Thanks for the won­der­ful arti­cle. I fol­lowed your step, but I am not able to add any project into the git­labhq GUI. It shows error
      Gito­lite Error
      Appli­ca­tion cant get access to your gito­lite system.

      Check ‘config/gitlab.yml’ for cor­rect settings.

      Make sure web server user has access to gito­lite. Setup tutorial

      Try:

      sudo chmod –R 770 /home/git/repositories/
      sudo chown –R git:git /home/git/repositories/

      I googled a lot but noth­ing seems to work. May be you could help. I am close but its just not work­ing.
      FYI, I am totally new to git and related things. Thanks in advance.

    19. git­lab can’t cre­ate repositories.

    20. I have tried to use you tuto­r­ial to set up my server with Cen­tOS release 5.8 (Final) and has sev­eral issues:

      1. Can‘t install gito­lite using yum:
      # yum info gito­lite
      Loaded plu­g­ins: fastest­mir­ror
      Load­ing mir­ror speeds from cached host­file
      * atomic: mir01.syntis.net
      * base: mirror.spro.net
      * extras: centos-mirror.jchost.net
      * rpm­forge: mir01.syntis.net
      * updates: mirror.thelinuxfix.com
      Error: No match­ing Pack­ages to list

      Do I need to install any addi­tional repos­i­tory with it? Can you pro­vide URL?

      2. Sev­eral prob­lems with Python part of instal­la­tion. All details are here: http://pastebin.com/zvxFpeBN
      Can‘t install Python related part of setup.

      3. Prob­lems with Ruby:

      3.1. Dur­ing # bun­dle install
      instal­la­tion process hav­ing error:

      Installing selenium-webdriver (2.22.2)
      Installing xpath (0.1.4)
      Installing capy­bara (1.1.2)
      Installing capybara-webkit (0.12.1) with native exten­sions
      Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

      /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb

      Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.12.1 for inspec­tion.
      Results logged to /usr/local/rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.12.1/./gem_make.out
      An error occurred while installing capybara-webkit (0.12.1), and Bundler can­not con­tinue.
      Make sure that ‘gem install capybara-webkit –v ‘0.12.1′‘ suc­ceeds before bundling.
      #
      # more /usr/local/rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.12.1/./gem_make.out
      /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
      #

      3.2. To fix it I have tried to run:
      # gem install capybara-webkit –v ‘0.12.1′
      Build­ing native exten­sions. This could take a while…
      ERROR: Error installing capybara-webkit:
      ERROR: Failed to build gem native extension.

      /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb

      Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.12.1 for inspec­tion.
      Results logged to /usr/local/rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.12.1/./gem_make.out
      # more /usr/local/rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.12.1/./gem_make.out
      /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
      #

      Can you help me to solve prob­lems above?

      • Hi Taras,

        Let’s see…

        1. Gito­lite is not in reg­u­lar Cen­tos repos.. try this tuto­r­ial to get it going: https://www.olumis.com/35/installing-git-and-gitolite-on-centos-5

        2. Don’t get me wrong, but did you per­form this as root user? If yes, then I’m not sure what is going on. Try google’ing those errors.

        3. I did once get those errors, when on new OS I for­got to install few pack­ages needed for devel­op­ment (make, gcc, cpp) or *-devel pack­ages needed by par­tic­u­lar ruby pack­age. Try look­ing in /usr/local/rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.12.1/./gem_make.out for more details.

        Is this whole out­put from make log?

        # more /usr/local/rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.12.1/./gem_make.out
        /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb

        You may try to find ready com­piled gem in Cen­tos repos (reg­u­lar or addi­tional). They might work out of the box.

        Let me know if you had any luck.

        Cheers,
        Peter

        • Peter,

          Thank you for your response.

          1. I have installed and comfin­gured gito­lite using this arti­cle as guide: http://linux4you2.blogspot.com/2012/03/how-to-install-gitolite-in-centos-or.html

          2. I have made all instal­la­tion as root user. I will try to search sim­i­lar errors in google.

          3. I have installed today:

          # yum groupin­stall “Devel­op­ment tools“
          # yum groupin­stall “Devel­op­ment libraries”

          and I have tried to run Pyton part of instal­la­tion one more time:

          # curl http://python-distribute.org/distribute_setup.py | python

          After install boot­strap.
          /usr/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg-info already exists

          #

          and then I have installed:

          # easy_install pip
          Search­ing for pip
          Best match: pip 1.2.1
          Pro­cess­ing pip-1.2.1-py2.4.egg
          pip 1.2.1 is already the active ver­sion in easy-install.pth
          Installing pip script to /usr/bin
          Installing pip-2.4 script to /usr/bin

          Using /usr/lib/python2.4/site-packages/pip-1.2.1-py2.4.egg
          Pro­cess­ing depen­den­cies for pip
          Fin­ished pro­cess­ing depen­den­cies for pip
          #

          but pyg­ments are failed:

          # pip install pyg­ments
          Trace­back (most recent call last):
          File “/usr/bin/pip”, line 8, in ?
          sys.exit(
          File “/usr/lib/python2.4/site-packages/distribute-0.6.28-py2.4.egg/pkg_resources.py”, line 337, in load_entry_point
          return get_distribution(dist).load_entry_point(group, name)
          File “/usr/lib/python2.4/site-packages/distribute-0.6.28-py2.4.egg/pkg_resources.py”, line 2311, in load_entry_point
          return ep.load()
          File “/usr/lib/python2.4/site-packages/distribute-0.6.28-py2.4.egg/pkg_resources.py”, line 2017, in load
          entry = __import__(self.module_name, globals(),globals(), [’__name__’])
          File “/usr/lib/python2.4/site-packages/pip-1.2.1-py2.4.egg/pip/__init__.py”, line 9, in ?
          from pip.basecommand import command_dict, load_command, load_all_commands, command_names
          File “/usr/lib/python2.4/site-packages/pip-1.2.1-py2.4.egg/pip/basecommand.py”, line 4, in ?
          from pkgutil import walk_packages
          ImportEr­ror: can­not import name walk_packages
          #

          Also, I have the same prob­lems with Ruby bun­dle insall part:

          # bun­dle install
          Fetch­ing gem meta­data from http://rubygems.org/.……

          Using capy­bara (1.1.2)
          Installing capybara-webkit (0.12.1) with native exten­sions
          Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

          /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb

          Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.12.1 for inspec­tion.
          Results logged to /usr/local/rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.12.1/./gem_make.out
          An error occurred while installing capybara-webkit (0.12.1), and Bundler can­not con­tinue.
          Make sure that ‘gem install capybara-webkit –v ‘0.12.1′‘ suc­ceeds before bundling.
          #

          Full out­put of /usr/local/rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.12.1/gem_make.out is:

          # cat /usr/local/rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.12.1/gem_make.out
          /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
          #

          Full errors list­ing at http://pastebin.com/t4ng5cET

          Do you have any ideas how to fix these prob­lems with Python and Ruby to com­plete git­labhq insal­la­tion and configuration?

    21. You have cre­ated a won­der­ful guide, I appre­ci­ate you!

      So far i have have fol­lowed every sin­gle step and i could fin­ish the instal­la­tion within cou­ple of hours, but now i am being pre­sented with a 404 error page after the login. Like below

      404
      The page you were look­ing for doesn’t exist.

      You may have mistyped the address or the page may have moved.”

      Would you please help me to fix the problem?

      • Kindly Ignore my pre­vi­ous com­ment. Now I am able to access git­lab main page but i am unable to cre­ate new projects, I get an error =

        Git­Lab was unable to access your Gito­lite sys­tem.
        Tips for Administrator:

        Check git logs in admin area

        Check config/gitlab.yml for cor­rect settings.

        Diag­nos­tic tool:

        bun­dle exec rake gitlab:app:status RAILS_ENV=production

        Permissions:

        sudo chmod –R 770 /home/git/repositories/
        sudo chown –R git:git /home/git/repositories/”

        when i run “bun­dle exec rake gitlab:app:status RAILS_ENV=production” I get an error even though i there is a folder called repos­i­to­ries and its per­mis­sion is set 770 and chowned for user git.

        Start­ing diag­nos­tics
        config/database.yml.….….…exists
        config/gitlab.yml.….….…exists
        /home/git/repositories/.….….…missing
        rake aborted!
        unex­pected return

        Tasks: TOP => gitlab:app:status
        (See full trace by run­ning task with –trace)”

        Please help me…

        • Hello Ben­son,
          Web server has to be able to access git user home direc­tory and par­tic­u­larly: repos­i­to­ries. In order to do that, repos­i­to­ries folder has to have at least 770 per­mis­sions — you have set this cor­rectly. Now you have to make sure that what­ever user web server is run­ning as, he is in git group. You can check it with:
          id [user_name]
          It will show you all groups that web server user is mem­ber of.
          I use Apache, so my user is ‘apache’.

          In order to add apache user to git group you can do some­thing like this:
          user­mod –G –a git apache

          Let me know if it helped.

          Peter

    22. Thanks for shar­ing your thoughts about process improve­ment.
      Regards

    23. Dear Piotrek,

      Thank you for this guide. am won­der­ing if it’s still rel­e­vant for the lat­est ver­sion of both prod­ucts, actul­lay git­lab is v7.1.1 and gito­lite is ver­sion 3.6.1.

      I was not able to fin­ish the install as, it seems that many things changed and now git­lab do have his own shell. may be there’s no more need to gito­lite, am I correct ?

      thanks again,
      Zydoon.

      • Hi Zydoon,

        You are right — my guide is seri­ously out­dated and it should be men­tioned in the very begin­ning. I will fix that immediately.

        Sorry for confusion.

        Peter


    Leave a comment

    Return to Top ▲Return to Top ▲