0

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 SetEnv GIT_HTTP_EXPORT_ALL 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> <Location /git-private> Order deny,allow Deny from all <Limit GET PROPFIND OPTIONS REPORT> Options Indexes FollowSymLinks MultiViews Allow from <redmine public ip> Allow from <redmine pvt ip> Allow from <localhost> </Limit> </Location> 
2
  • 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... Commented Jul 7, 2012 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? Commented Jul 8, 2012 at 5:19

1 Answer 1

0

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.

2
  • 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 Commented Jul 9, 2012 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 Commented Jul 9, 2012 at 5:14

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.