本文介绍了使用 https 克隆项目 gitlab 时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用协议Https"克隆我的 Gitlab 项目时遇到问题.使用 git 协议一切正常.

I've a problem when i try to clone my Gitlab project with the protocol "Https". With the git protocol everything works fine.

错误:

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?

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

I've tried many solutions but the error is still here.

有人可以帮助我吗?

感谢您的帮助,祝您有美好的一天!

Thank's for your help and have a nice day!

推荐答案

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

My Problem was the Apache configuration file. My example configuration

<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

这篇关于使用 https 克隆项目 gitlab 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 16:36
查看更多