#之前在自己的服务器里面安装了gitlabce玩.后来不知道怎么回事,web访问正常 , 但是git提交不了,也pull不了.... #然后自己摸索,坑爹的ruby不熟悉 , 搞了我大半天啊.....
#首先祭出gitlab强大的工具 gitlab-ctl tail; #查看当前服务器的日志,非常好用 gitlab-ctl reconfigure; #这个命令慎用 , 它会重新创建gitlab的代码, 然后你的gitlab就会恢复默认配置了(gitlab.yml)... gitlab-ctl stop nginx; #停止对应的服务,由于我本机自己编译了个nginx , 所以我要吧gitlab自己打包的nginx干掉,不给启用.
#由于我自己的nginx是nobody身份启动,gitlab的目录是git账号的,然后坑爹的事情就来了 , 会出现很多权限报错: connect() to unix:/data1/htdocs/gitlab.mmfei.com/tmp/sockets/gitlab.socket failed (2: No such file or directory) connect() to unix:/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket failed (13: Permission denied) connect() to unix:/var/opt/gitlab/gitlab-git-http-server/socket failed (13: Permission denied)
#权限问题可以用下面的一刀切的方式解决 , 虽然不好 , 但是对于小白来说 , 已经够了 chmod 777 /usr/local/nginx.1.5.12/fastcgi_temp -R ; chmod 777 /var/opt/gitlab/gitlab-rails/sockets; chown git:git -R /opt/gitlab/embedded/service/gitlab-rails/public; chmod 777 /var/opt/gitlab/gitlab-git-http-server/; ##一些收集的有意义的日志和目录..... /opt/gitlab #holds application code for GitLab and its dependencies. /var/opt/gitlab #holds application data and configuration files that gitlab-ctl reconfigure writes to. /etc/gitlab #holds configuration files for omnibus-gitlab. These are the only files that you should ever have to edit manually. /var/log/gitlab #contains all log data generated by components of omnibus-gitlab. /var/log/gitlab/gitlab-rails/production.log; /home/git/gitlab/config/gitlab.yml.example; /home/git/gitlab/config/gitlab.yml; /var/opt/gitlab/gitlab-rails/etc/gitlab.yml;