I have a Redmine installation on the same server as my gitolite repositories.
In order to link my repository to my Redmine instance, I locally cloned the repo with t
If a git repack remote/origin/master
doesn't fix the issue, check your umask (umask 0002
) to avoid any writing permission issue, as mentioned in "git: can't push (unpacker error)".
Beside that, "Unpacker error Git-pushing from bare repo to staging server" summarize all the other points to check.
I managed to get it working pointing the original repo to Redmine, since both sit on the same machine, by following some simple steps:
Add a repository on Redmine with the original repo of gitolite's repository. The path would be something like /home/git/repositories/my-repo.git
.
Initially, Redmine doesn't have any permissions to read the repository, so we fix the problem by adding the Redmine user (usually www-data
or apache
) to the git
group by running usermod -a -G git www-data
(be aware of your server's configuration, because that can be a little different, according to how you configurated gitolite.
Change the UMASK
property on the .gitolite.rc
file, from the default value of 0077
to 0022
, the equivalent of 755 (rwxr-xr-x)
for directories and 644 (rw-r--r--)
for files.
For existing repos, you might need to run a chmod -R g+rX
If you still experience the permissions trouble with Redmine, where it opens a 404
instead of the repo on the repository tab, you might have to run a chmod -R g+rX
on the whole /home/git/repositories
, in order to make sure the Redmine user can read all the way through the repos.