109°

gitlab Error:Gitaly - load linguist colors - permission denied

报错信息

2020-01-20_14:35:08.43180 time=“2020-01-20T14:35:08Z” level=info msg=“Starting Gitaly” version=“Gitaly, version 0.81.0, built 20180225.183225” 2020-01-20_14:35:08.43185 time=“2020-01-20T14:35:08Z” level=warning msg=“git path not configured. Using default path resolution” resolvedPath=/opt/gitlab/embedded/bin/git 2020-01-20_14:35:08.43490 time=“2020-01-20T14:35:08Z” level=warning msg=“git path not configured. Using default path resolution” resolvedPath=/opt/gitlab/embedded/bin/git 2020-01-20_14:35:08.43505 time=“2020-01-20T14:35:08Z” level=fatal msg=“load config” config_path=/var/opt/gitlab/gitaly/config.toml error="load linguist colors: open /tmp/gitaly-linguist-path1474889659: permission denied"

查看tmp权限设置

drwxr-x--x    5 root root 4.0K Jan 21 13:08 tmp

分析

从日志及tmp的权限可以看出,gitaly没有tmp的写权限

解决方法

方法一:

修改tmp权限:sudo cchmod 777 /tmp

方法二:

1、添加gitaly有读写权限的目录:sudo -u git mkdir /var/opt/gitlab/gitaly/tmp

2、在配置文件里设置目录位置:gitaly[‘env’] = { ‘TMPDIR’ => ‘/var/opt/gitlab/gitaly/tmp’ }

最后重新gitaly服务

 

本文由【J】发布于开源中国,原文链接:https://my.oschina.net/jennerlo/blog/3160730

全部评论: 0

    我有话说: