gpt4 book ai didi

git - Debian 压缩 : gitolite +ssh +apache2 +suexec +http-backend

转载 作者:太空狗 更新时间:2023-10-29 14:15:57 27 4
gpt4 key购买 nike

我按照步骤进行配置:http://sitaramc.github.com/gitolite/ggshb.html

但是当我尝试制作一个 git clone 时,我遇到了这个错误:

git clone http://guillaume@git.domain.net/gitolite-admin
Initialized empty Git repository in /home/guidtz/tmp/tmp/gitolite-admin/.git/
Password:
fatal: http://guillaume@git.domain.net/gitolite-admin/info/refs not found: did you run git update-server-info on the server?

我完成了 git update-server-info。

我将 http 配置放在 repos/config 中:

[http]
receivepack = true

info/refs 文件存在

我的 apache 虚拟主机:

<VirtualHost *:80>
ServerName git.domain.net
ServerAdmin sysadmin@domain.net

LogLevel debug
ErrorLog "|/usr/bin/cronolog /var/log/apache2/git/%Y/%W/%d-error.log"
CustomLog "|/usr/bin/cronolog /var/log/apache2/git/%Y/%W/%d-access.log" combined

DocumentRoot /var/www/gitweb

SuexecUserGroup gitolite gitolite

SetEnv GIT_PROJECT_ROOT /home/git/repositories
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv GITOLITE_HTTP_HOME /home/git

ScriptAliasMatch "(?x)^/(.*/(HEAD | info/refs | objects/(info/[^/]+ | [0-9a-f]{2}/[0-9a-f]{38} | pack/pack-[0-9a-f]{40}\.(pack|idx)) | git-(upload|receive)-pack))$" /var/www/bin/gitolite-suexec-wrapper.sh/$1
<Directory "/var/www/gitweb">
Options ExecCGI
AllowOverride None
AddHandler cgi-script .cgi
DirectoryIndex gitweb.cgi
Order allow,deny
Allow from all
</Directory>
<Directory "/var/www/bin">
<Files "gitolite-suexec-wrapper.sh">
Order allow,deny
Allow from all
</Files>
</Directory>

<Location / >
AuthType Basic
AuthName "Private Git Access"
AuthUserFile /etc/apache2/gitusers
Require valid-user
</Location>
</VirtualHost>

我的包装文件/var/www/bin/gitolite-suexec-wrapper.sh

#!/bin/bash
#
# Wrapper for gl-auth-command
#

USER=$1

export GIT_PROJECT_ROOT="/home/git/repositories"
export GITOLITE_HTTP_HOME="/home/git"

exec /home/git/bin/gl-auth-command $USER

# End

最佳答案

我发现我的错误,我忘记了/

Directory "/var/www/bin">

我不得不添加一个空文件 git-daemon-export-ok

所以当我 push 时。 Gitolite 仅在 gitolite-admin 项目中删除 git-daemon-export-ok,而不会在所有其他项目中删除。

关于git - Debian 压缩 : gitolite +ssh +apache2 +suexec +http-backend,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8297397/

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