gpt4 book ai didi

linux - 无法使用来自 Gitolite 服务器的 HTTP 克隆存储库

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:34:12 25 4
gpt4 key购买 nike

我在 centOS 7 上同时在 ssh 和 http 模式下运行 Gitolite。我关注了 this教程原样。

我的问题是 我可以通过 ssh 克隆所有 repos,但即使在向所有添加 R = daemon 访问规则后,也只能通过 http 克隆 testing.git repo我想通过 http 提供的存储库。

gitolite.conf 看起来像这样:

猫 gitolite.conf

repo gitolite-admin
RW+ = Git-Admin

repo testing
RW+ = @all

repo avengers
RW+ = Git-Admin

repo @all
R = daemon gitweb

ssh git@192.168.15.2 信息

hello Git-Admin, this is git@osboxes running gitolite3 v3.6.9-0-g144d8a2 on git 1.8.3.1

R W avengers
R W gitolite-admin
R W testing

curl http://admin:admin@192.168.15.2/git/info

hello admin, this is httpd@osboxes running gitolite3 v3.6.9-0-g144d8a2 on git 1.8.3.1

R W testing

我不知道哪里出了问题。

提前致谢

[root@osboxes 存储库]# vim/var/www/bin/gitolite-suexec-wrapper.sh

#!/bin/bash 
#
#Suexec wrapper for gitolite-shell
#

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

exec ${GITOLITE_HTTP_HOME}/gitolite/src/gitolite-shell

[root@osboxes 存储库]# cat/etc/httpd/conf/httpd.conf

<VirtualHost *:80> 
# You can comment out the below 3 lines and put correct value as per your server information
# ServerName gitserver.example.com
# ServerAlias gitserver
ServerAdmin youremailid@example.com

DocumentRoot /var/www/git
<Directory /var/www/git>
Options None
AllowOverride none
Order allow,deny
Allow from all

</Directory>

SuexecUserGroup git git
ScriptAlias /git/ /var/www/bin/gitolite-suexec-wrapper.sh/
ScriptAlias /gitmob/ /var/www/bin/gitolite-suexec-wrapper.sh/
#ScriptAlias /git/ /home/git/gitolite/src/gitolite-shell
#ScriptAlias /gitmob/ /home/git/gitolite/src/gitolite-shell

<Location /git>
AuthType Basic
AuthName "Git Access"
Require valid-user
AuthUserFile /etc/httpd/conf/git.passwd
</Location>
</VirtualHost>

最佳答案

查看/etc/httpd/conf/git.passwd的内容在你的 Gitolite 服务器上。

如果不包含admin/<encrypted password> ,它会将您验证为“匿名”,这意味着您只能访问来自 @all 的 repo 协议(protocol)组。

关于linux - 无法使用来自 Gitolite 服务器的 HTTP 克隆存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52304278/

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