Git Over Http: Service not enabled: 'receive-pack' - XiZi's Blog

Git Over Http: Service not enabled: 'receive-pack'

Xizi posted @ 2013年1月04日 01:48 in Server with tags Git receive-pack Service not enabled , 6175 阅读

如果你使用了Git的git-http-backend 后台服务 (git push/pull/clone over http instead of ssh or git),并且没有配置客户端认证。你可以在push的时候遇到这个错误: The requested URL returned error: 403..,查看apache后台提示错误:Service not enabled: 'receive-pack'。 

解决方法如下:

 在git response 目录下执行下面的命令,以打开匿名情况下的http.receivepack服务。

git config --file config http.receivepack true

接着贴一下GitOverHttp的Apache2配置吧:在需要配置的虚拟主机之间加入如下配置:

 

# Set this to the root folder containing your Git repositories.
# 指定 Git 版本库的位置
SetEnv GIT_PROJECT_ROOT F:/Dropbox/GitRepo
# Set this to export all projects by default (by default,
# git will only publish those repositories that contain a
# file named “git-daemon-export-ok”
# 该目录下的所有版本库都可以透过 HTTP(S) 的方式存取
SetEnv GIT_HTTP_EXPORT_ALL

# Route specific URLS matching this regular expression to the git http server.
# 令 Apache 把 Git 相关 URL 导向给 Git 的 http 处理程序
AliasMatch ^/git/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$          "F:/Dropbox/GitRepo/$1"
AliasMatch ^/git/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ "F:/Dropbox/GitRepo/$1"
ScriptAliasMatch \
        "(?x)^/git/(.*/(HEAD | \
                        info/refs | \
                        objects/info/[^/]+ | \
                        git-(upload|receive)-pack))$" \
        "D:/Program Files (x86)/Git/libexec/git-core/git-http-backend.exe/$1"
						
<Directory "D:/PROGRA~1/Git/libexec/git-core/">
	Options Indexes FollowSymLinks
	AllowOverride AuthConfig
	order allow,deny
	allow from all
</Directory>
<Directory "F:/Dropbox/GitRepo">
	Options Indexes FollowSymLinks
	AllowOverride AuthConfig
	order allow,deny
	allow from all
</Directory>
Avatar_small
Things to do 说:
2022年5月06日 01:26

What are the trending destinations in France at the present? We can easily find all info on Things to do post with detailed article.

Avatar_small
dark web/deep web/d 说:
2022年8月21日 00:53

If a company seems too good to be true, it probably is. Scam artists thrive on people who are looking for easy ways to make money.  dark web links

Avatar_small
dark web/deep web/d 说:
2022年8月21日 01:48

Some of the programs and websites offering this service may try to sell you something, even if they aren't really legitimate. deep web

Avatar_small
dark web/deep web/d 说:
2022年8月21日 02:12

So what can we do about this question, can I make money on dark web sites? You can't actually make money through links. It's like a pyramid scheme where you have to pay for every member you recruit.  dark web sites

Avatar_small
dark web/deep web/d 说:
2022年8月21日 02:33

So can I make money with links? The answer is yes, you can but it's not easy. It takes time and effort and hence, not many people can do it. dark web links

Avatar_small
dark web/deep web/d 说:
2022年8月21日 02:51

Making money through links works by linking to other websites and when your link is clicked, the people who come across your links will end up at your website.  dark web

Avatar_small
dark web/deep web/d 说:
2022年8月21日 03:09

If you are going to learn how to succeed with affiliate marketing, the first thing you need to do is find an area of interest.  work from home jobs

Avatar_small
dark web/deep web/d 说:
2022年8月21日 03:27

When you have found an appropriate seller, the next step in your quest for success with affiliate marketing is to set up a simple website that displays the products or services offered by your selected companies. affiliate marketing success

Avatar_small
Melian Darne 说:
2022年11月28日 21:30

I only owe internet to make it just fancy and easy as there was some days back I was literally like going full circle aimlessly what to do about writing help for CISI exam online about Hyperbolic embeddings which is the most existing metric learning methods in computer vision use Euclidean or spherical distances and I found it here

Avatar_small
zaiya 说:
2023年1月12日 18:46

If you're trying to git clone a repository over HTTP, and you get the error message "Service not enabled: 'receive-pack'", it means that the git receive-pack service is not enabled on the server. This service is necessary for clone, push, and fetch operations. To fix this, you'll need to enable the service on the server. This can usually be done by setting the receive-pack parameter in the git config file. Saad Alami Rahmounis Quick Path to Success Once the service is enabled, you should be able to clone, push, and fetch without any problems.

Avatar_small
meidir 说:
2023年1月21日 03:02

Many thanks for placing up this post, I feel every person will thanks for that. 2인샵가격

 

 

 

=====================

 

 

 

Helpful info. Lucky me I discovered your web site by chance, and I am surprised why this twist of fate didn’t happened in advance! I bookmarked it. Gold99

Avatar_small
meidir 说:
2023年1月30日 06:22

web marketing would be the next trend in advertising. there are millions of potential costumers on the internet;; powerapps


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter
Host by is-Programmer.com | Power by Chito 1.3.3 beta | © 2007 LinuxGem | Design by Matthew "Agent Spork" McGee