我在GitLab 7上安装了CentOS 7.7.2并成功安装。
现在,我尝试以子目录样式(如GitLab )运行http://url/gitlab。
我查看了这个文件,并根据这个指令进行了修改。/opt/gitlab/embedded/service/gitlab-rails/config
然后我预编了程序,得到了错误。
# gitlab-rake assets:precompile RAILS_ENV=production
I, [2015-02-27T17:35:18.980208 #4864] INFO -- : Writing /opt/gitlab/embedded/service/gitlab-rails/public/assets/authbuttons/github_32-199ebcd7adccbfe20068d39bfd57e6bf.png
rake aborted!
Errno::EACCES: Permission denied @ rb_sysopen - /opt/gitlab/embedded/service/gitlab-rails/public/assets/authbuttons/github_32-199ebcd7adccbfe20068d39bfd57e6bf.png+
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)我该怎么办?
发布于 2015-02-28 09:52:28
首先,直接更改文件将导致在reconfigure之后重写它们。在调用gitlab-rake时,您不必声明由gitlab-rake包装器处理的RAILS_ENV。
现在,就相对url选项而言,这还没有在总括包中实现。
发布于 2015-10-09 13:14:34
这个职位描述了一个很好的解决方法。类似于用户建议,我们可以暂时打开编译新资产和更改资产的权限,然后再次关闭它们。
通过使用ACLs,而不是标准位,这只对git用户进行,而不实际更改root:root的所有权。
# ... hack on CSS ...
# Need to let user `git` write to assets/ because gitlab-rake tries to write
# to it as `git`, while `assets/` is owned by root.
apt-get install acl
setfacl -R -m u:git:rwX /opt/gitlab/embedded/service/gitlab-rails/public/assets/
gitlab-rake assets:precompile RAILS_ENV=production
chmod -R a+rX /opt/gitlab/embedded/service/gitlab-rails/public/assets/
# Remove git's write access
setfacl -R -x u:git /opt这既适用于添加新映像,也适用于更改现有资产。
发布于 2015-02-28 20:54:55
chmod -R 1777 /opt/gitlab/embedded/service/gitlab-rails/public/assets为我做了这个把戏。
它为每个人设置完整读/写/执行的权限,并在't‘上设置粘性位(除了root/文件所有者之外,没有人可以删除目录,从而允许rake完成它的操作)。
https://stackoverflow.com/questions/28760917
复制相似问题