我尝试使用协议(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