gpt4 book ai didi

git - 使用 https 克隆项目 gitlab 时出错

转载 作者:太空狗 更新时间:2023-10-29 13:03:20 27 4
gpt4 key购买 nike

当我尝试使用协议(protocol)“Https”克隆我的 Gitlab 项目时遇到问题。使用 git 协议(protocol)一切正常。

错误:

Cloning into 'test'...
fatal: https://XXXX.XXXX.XXXX.XXXX/user.name/test.git/info/refs?service=git-upload-pack
not found: did you run git update-server-info on the server?

我已经尝试了很多解决方案,但错误仍然存​​在。

有人可以帮助我吗?

感谢您的帮助,祝您有愉快的一天!

最佳答案

我的问题是 Apache 配置文件。我的示例配置

<VirtualHost ip:80>
ServerName git.domain.tld
Redirect permanent / https://git.domain.tld/
</VirtualHost>

<VirtualHost ip:443>
ServerName git.domain.tld
DocumentRoot /home/git/gitlab/public

<Location />
ProxyPassReverse http://127.0.0.1:8080
ProxyPassReverse http://git.domain.tld
</Location>

RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA]
RequestHeader set X_FORWARDED_PROTO 'https'
</VirtualHost>

来源:https://github.com/gitlabhq/gitlab-recipes/tree/master/web-server/apache

关于git - 使用 https 克隆项目 gitlab 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14830652/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com