Redmine + Gitolite - Issue with repository permissions and more

前端 未结 2 1888
情话喂你
情话喂你 2020-12-14 12:43

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

相关标签:
2条回答
  • 2020-12-14 12:57

    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.

    0 讨论(0)
  • 2020-12-14 13:01

    I managed to get it working pointing the original repo to Redmine, since both sit on the same machine, by following some simple steps:

    1. 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.

    2. 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.

    3. 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.

    4. 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 404instead 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.

    0 讨论(0)
提交回复
热议问题