Miguel Borges Miguel Borges - 2 months ago 9x
Git Question

add gitlab repository to redmine

I'm try add a gitlab repository to redmine, but when accessing the repository via redmine, this displays the following message:

"The entry or revision was not found in the repository."

My repo configuration:

enter image description here

redmine: 2.4.1

OS: ubuntu


test of www-data permissions:

root@Development:~# su www-data
$ ls /home/git/repositories/mapb_1990/test.git/
branches config description HEAD hooks info objects refs


If you are using Passenger module for Apache chances are it might be running under nobody user (and not www-data). Check out with:

root@Development:~# ps auxf | grep -A 8 -e "/usr/sbin/apache2 -k star[t]" -e /usr/local/share/redmin[e]

and look for processes starting with Passenger and Rack: are they running under nobody (I had the exact same issue and fixed it now so I can't check what exact output you should have).

(Redmine is located at /usr/local/share/redmine in my setup).

And, in default setup, nobody cannot access to /home/git/repositories/:

root@Development:~# su nobody
sh-4.2$ ls /home/git/repositories/
ls: cannot access /home/git/repositories/: Permission denied

You have two options:

  • Makes path to "/home/git/repositories/mapb_1990/test.git/" available to all (chmod -R o=rx /home/git/repositories/mapb_1990/test.git/)
  • Change Passenger use and group in VirtualHost configuration by adding following lines to your VirtualHost file:

    <IfModule mod_passenger.c>
        PassengerUser www-data
        PassengerGroup www-data

    You might also want to run theses commands to make sure previously nobody:nogroup owned files are transfered to www-data:www-data:

    root@Development:~# find /usr/local/share/redmine -user nobody -exec chown www-data {} \;
    root@Development:~# find /usr/local/share/redmine -group nogroup -exec chgrp www-data {} \;

    And restart Apache:

    root@Development:~# service apache2 restart