Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've setup Redmine 2.1 on my Debian Squeeze server following this Tutorial HowTo configure Redmine for advanced git integration (I tried to use the grack path). Redmine server is running properly, but I have a problem granting users access to git repositories.

When I try to clone a repository it says:

error: The requested URL returned error: 500 while accessing

The apache error.log shows this entry:

[Fri Sep 28 15:50:56 2012] [crit] [client xx.xx.xx.xx] configuration error: couldn't check user. Check your authn provider!: /repo.git/info/refs

It also asks me for user and password when cloning, but it shouldn't if I understand the tutorial right.

I'm using the Redmine authentication module:

<VirtualHost *:80>
    ServerName my.server.at
    DocumentRoot "/var/www/my.server.at/public" 

    PerlLoadModule Apache::Redmine

    <Directory "/var/www/my.server.at/public">
        Options None
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

        SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER" 
        SetEnv GIT_PROJECT_ROOT /var/git/my.server.at/
        SetEnv GIT_HTTP_EXPORT_ALL
        ScriptAlias /git/ /usr/lib/git-core/git-http-backend

    <Location />
        Order allow,deny
        Allow from all

        AuthType Basic
        AuthName Git
        Require valid-user

        AuthBasicAuthoritative Off
        AuthUserFile /dev/null
        AuthGroupFile /dev/null

        PerlAccessHandler Apache::Authn::Redmine::access_handler
        PerlAuthenHandler Apache::Authn::Redmine::authen_handler

        RedmineDSN "DBI:mysql:database=redmine;host=localhost" 

        RedmineDbUser "user" 
        RedmineDbPass "password" 
        RedmineGitSmartHttp yes
    </Location>
</VirtualHost>

Can someone help me please and explain the error and what I can do to solve my problem?

share|improve this question
    
Do you have authn_default module loaded? –  c2h5oh Oct 2 '12 at 22:45
    
authn_default is disabled –  woni Oct 2 '12 at 23:30
    
Enable modn_authn_default and mod_auth_basic, restart apache and try again. –  c2h5oh Oct 2 '12 at 23:46
    
With authn_default enabled I get following error code access to /repo.git/info/refs failed, reason: verification of user id 'user' not configured. After setting AuthBasicAuthorative On i get following user user not found: /repo.git/info/refs. Module auth_basic was already enabled. The user 'user' exists in Redmine and can log on the web interface. –  woni Oct 3 '12 at 8:02

2 Answers 2

I looked at my configuration and I have the following. This has worked well for about a year.

PerlLoadModule Apache::Authn::Redmine

SetEnv GIT_PROJECT_ROOT /var/lib/git
SetEnv GIT_HTTP_EXPORT_ALL

ScriptAlias /git/ /usr/lib/git-core/git-http-backend/

<Location /git>
    Order allow,deny
    Allow from all

    AuthType Basic
    Require valid-user
    AuthName "XXXXXX Git Repos"

    PerlAccessHandler Apache::Authn::Redmine::access_handler
    PerlAuthenHandler Apache::Authn::Redmine::authen_handler

    RedmineDSN "DBI:mysql:database=redmine_default;host=localhost"
    RedmineDbUser "redmine"
    RedmineDbPass "xxxxxxx"
    RedmineGitSmartHttp yes
</Location>

<Location /git-private>
    Order deny,allow
    Deny from all
    <Limit GET PROPFIND OPTIONS REPORT>
        Options Indexes FollowSymLinks MultiViews
        Allow from 127.0.0.1
    </Limit>
</Location>

This is for Ubuntu 12.04.1. Hope it helps, the main diff is that I am loading Apache::Authn::Redmine and you are loading Apache::Redmine.

share|improve this answer

make sure you have following inside of your httpd.conf

LoadModule authz_core_module modules/mod_authz_core.so

I also found this: Faced with an Internal Server Error for more than an hour | Daniel Stavrovski.Net

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.