1

我正在尝试将 GIT 存储库添加到我的 redmine 安装中。

我正在使用 gitorious 进行远程管理。根据Redmine 和 Git 集成,我添加了脚本(http://blog.sofistes.net/2010/03/unhashing-gitorious-paths.html),它使符号链接到存储库。这一切都很好。

但是当我将这样的 repo 添加到 Redmine 时,我收到一个错误:

404 - 在存储库中找不到条目或修订。

在日志文件(/var/www/redmine/default/production.log)中,我发现:

Processing RepositoriesController#show (for 192.168.1.100 at 2012-05-31 10:46:09) [GET] 参数:{"action"=>"show", "id"=>"test-123", "controller" =>"repositories"} 布局/基础中的渲染模板渲染常见/错误(404)在 169 毫秒内完成(查看:42,DB:8)| 404 未找到 [ http://redmine.test.com/projects/test-123/repository]

但是,当我在 /var/www/test.com 中创建一个 git repo 并将其 (/var/www/test.com/.git/) 添加到 Redmine 时,一切都很好......

两个 repos 都归 git:git 所有,并且具有相同的权限。

有人有什么建议吗?

4

1 回答 1

0

两个 repos 都归 git:git 所有,并且具有相同的权限。

存储库具有相同的权限,但 Redmine 用户可能无法访问该路径。您可以尝试将 git 用户添加到 www-data 组

sudo usermod -a -G www-data git

或者为您的存储库路径明确设置权限:

sudo chmod 775 -R /projects
于 2017-01-26T08:54:52.537 回答