GitLab 安装上后git clone时出现403 404错误的解决方法

1. 403

http://stackoverflow.com/questions/21635299/try-install-gitlab-6-5-stable-but-have-a-403-forbiden

warning: Insecure world writable dir /home/git/gitlab/vendor/bundle/ruby/1.9.1/bin in PATH, mode 042777

It seems you have some issues with the permissions being too open. Fix that by going to /home/git/gitlab/ and run:

  • find . -type f -print0 | xargs -0 chmod 644 (all files 644 recursively)
  • find . -type d -print0 | xargs -0 chmod 755 (all directories 755 recursively)
  • sudo -u git -H chmod o-rwx config/database.yml (extra security for the database)

If that is not the case then maybe its SELinux. You can check that quickly by disabling it temporarily:

setenforce 0

If the 403 error goes away then enable it back (setenforce 1) and see here at the SELinux section how to make it work.



2.404

http://stackoverflow.com/questions/21327907/check-gitlab-api-access-failed-code-404


A simple search - https://github.com/gitlabhq/gitlab-shell/issues/37 reveals that URL set in config.yml for gitlab-shell is incorrect and causes 404 error.

Make sure the config.yml for gitlab-shell is pointing at the correct url or a url that your web server is configured to listen for (eg, probably not localhost).


404错误是由于"/usr/bin/git"程序没找到,所能用命令:ln /usr/local/bin/git /usr/bin/git,问题得到解决。





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值