Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have setup redmine integration with apache as described in the redmine documentation. I have a /git path accessible with auth and /git-private accessible only to redmine. When I clone the repository through /git path, I get the up-to-date repo. But when I try to view it in redmine repo viewer, I get a 404 "The entry or revision was not found in the repository." error. Trying to clone using the git-private url in the redmine box gives a bare repository though it is the same repo as the one cloned by the /git path. I have enabled RedmineGitSmartHttp in the /git path. What could be the issue here?

PerlLoadModule Apache::Redmine

SetEnv GIT_PROJECT_ROOT /path/to/git/root

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

<Location /git>
      AuthType Basic
      Require valid-user
      AuthName "Git"

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

      RedmineDSN "DBI:mysql:database=<dbname>;host=<db host>" 
      RedmineDbUser "<user>" 
      RedmineDbPass "<password" 

      RedmineGitSmartHttp yes

<Location /git-private>
      Order deny,allow
      Deny from all

        Options Indexes FollowSymLinks MultiViews
         Allow from <redmine public ip>
         Allow from <redmine pvt ip>
         Allow from <localhost>
share|improve this question
It seems to me that all the redmine options are only set on /git and not /git-private but I don't know if that's intentional... – DerfK Jul 7 '12 at 19:19
@DerfK The redmine options are set on /git because that is the path through which the world will access the git repository and hence it has Redmine options pertaining to authentication and access permissions. /git-private is meant only for redmine to use and it just reads the repositories directly over http without requiring any credentials. Is there some issue with this? – Guruprasad Jul 8 '12 at 5:19

Redmine can't access a git repository via HTTP. It always needs direct file system access to the bare git repo for showing its content on the Repository tab. Thus your /git-private construct will not work at all (although something like this could be done with Subversion)

Consequently, in the repository settings of Redmine, you have to enter a filesystem path to the bare git repository, not a URL.

share|improve this answer
Isn't it a bad idea to give server paths in redmine? If the server is migrated to another server and the path there changes, then this would require a lot of changes – Guruprasad Jul 9 '12 at 5:10
Also I have seen a lot of howto's on the internet which use exactly the same method and I don't see how and why redmine cannot access the git repo over http – Guruprasad Jul 9 '12 at 5:14

Your Answer


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.