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
    评论
回答: 根据引用\[1\]的信息,出现404错误可能是由于gitlab-shell的config.yml文件中设置的URL不正确导致的。你可以检查一下config.yml文件中的URL设置是否正确。 此外,根据引用\[2\]提供的安装步骤,你可以尝试使用docker-compose方式安装gitlab。确保你按照步骤中的要求进行配置,并启动服务。在启动后,你可以通过访问http://10.11.20.48:8060来验证安装是否成功。 另外,引用\[3\]中的警告信息可能与安装过程中的权限设置有关。你可以检查一下相关目录的权限设置是否正确。 综上所述,如果你在安装gitlab后遇到404错误,你可以检查config.yml文件中的URL设置、使用docker-compose方式安装并验证配置是否正确,并检查相关目录的权限设置。 #### 引用[.reference_title] - *1* *3* [GitLab 安装上后git clone出现403 404错误解决方法](https://blog.csdn.net/suirosu/article/details/39588489)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [GitLab安装](https://blog.csdn.net/mengdx521/article/details/120866301)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值