Ubuntu上設置GitLab權限主要涉及用戶、組、文件及項目權限管理,具體步驟如下:
git
運行,編輯配置文件/etc/gitlab/gitlab.rb
:user 'git', home: '/home/git'
運行sudo gitlab-ctl reconfigure
應用更改。/var/opt/gitlab
)權限:sudo chown -R git:git /var/opt/gitlab
sudo chmod -R 755 /var/opt/gitlab
600
:chmod 600 ~/.ssh/id_rsa
/var/opt/gitlab/nginx
目錄設為www-data
用戶)。sudo ufw allow 80,443/tcp
。完成設置后,重啟GitLab服務:sudo gitlab-ctl restart
。
更多細節可參考GitLab官方文檔。