AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-556377

Anon34623's questions

Martin Hope
Anon34623
Asked: 2020-01-28 04:38:47 +0800 CST

尝试通过 http 克隆/获取任何 repo 时出现 Gitolite 502

  • 1

我正在尝试将 gitolite 配置为使用 gitweb 在 nginx 上工作。尽管 gitweb 可以完美地工作并识别 gitolite 提供的所有访问控制功能,但我似乎无法通过 http 访问存储库本身。例如,当我尝试获取 repo 时,我得到:

user@hostname:$ git fetch origin master Username for 'http://git.<hostname>': <Username> Password for 'http://<Username>@git.<hostname>': remote: An error occurred while reading CGI reply (no response received) fatal: unable to access 'http://git.<hostname>/git/<reponame>.git/': The requested URL returned error: 502

我当前的 nginx 配置如下所示:

server {
    listen 127.0.0.1:80;

    server_name git.<hostname>;
    root /usr/share/gitweb;

    # Basic Authentication
    auth_basic "Private Git Server";
    auth_basic_user_file /srv/etc/.htpasswd;

    location ~ /git(/.*) {
    root /srv/git/;

    client_max_body_size 0;

    # fcgiwrap is set up to listen on this host:port
    include       fastcgi_params;
    fastcgi_param SCRIPT_FILENAME    /srv/git/gitolite-source/src/gitolite-shell;

    # export all repositories under GIT_PROJECT_ROOT
    fastcgi_param REMOTE_USER $remote_user;
    fastcgi_param GIT_HTTP_EXPORT_ALL "";
    fastcgi_param GIT_PROJECT_ROOT    /srv/http/repositories;
    fastcgi_param GITOLITE_HTTP_HOME /srv/git;
    fastcgi_param PATH_INFO           $1;
    fastcgi_pass    unix:/var/run/fcgiwrap.sock;
    }

    try_files $uri @gitweb;
    location @gitweb {
    fastcgi_pass unix:/var/run/fcgiwrap.sock;
    fastcgi_param SCRIPT_FILENAME   /usr/share/gitweb/gitweb.cgi;
    fastcgi_param PATH_INFO         $uri;
    fastcgi_param REMOTE_USER $remote_user;
    fastcgi_param GITWEB_CONFIG     /srv/git/gitweb/gitweb.conf;
    include fastcgi_params;
    }
}

Gitolite 安装在 /srv/git 中,所有存储库(以及 gitolite 配置文件等)都存储在 /srv/http 中(在 http 用户下运行 gitolite)。我怀疑这是一个错误配置的问题。我需要做些什么才能使用我当前的设置通过 http 操作 git?我使用 Arch,顺便说一句

nginx git gitolite fcgi
  • 1 个回答
  • 131 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve