gitolite推送错误 - >远程:ENV GL_RC未设置 [英] gitolite push error -> remote: ENV GL_RC not set
问题描述
我试图将内容从工作站推送到服务器。但它给了我一个错误。请看下面的命令和错误:
I am trying to push content from a workstation to a server. But it gives me an error. Please look at the following for command and error:
Administrator@ganesh ~/testing
$ git push origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 241 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: ENV GL_RC not set
remote: BEGIN failed--compilation aborted at hooks/update line 20.
remote: error: hook declined to update refs/heads/master
To git@ganesh:repositories/testing
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'git@ganesh:repositories/testing'
看来我需要设置环境变量 GL_RC
。这是吗?
It seems that I need to set the environment variable GL_RC
. Is this so?
任何人都可以告诉我这个问题可能是什么,我该如何解决?我在Windows Server 2003上使用gitolite。
Can anyone here tell me what the problem might be and how I can solve it? I am using gitolite on Windows Server 2003.
推荐答案
如doc ssh疑难解答,这可能是由克隆过程中的错误路径引起的。
As illustrated in the doc ssh troubleshooting, this is probably caused by an incorrect path during cloning.
文档(下面的一些部分仅对Gitolite V2有效)提及:
The documentation (some parts below were only valid for Gitolite V2) mentions:
第二个错误
The second error
(例如:您可以克隆存储库但无法推回更改(错误会抱怨 GL_RC
环境如果你使用 git @ server,那么会发生
(ie. "you are able to clone repositories but are unable to push changes back (the error complains about the GL_RC
environment variable not being set, and the hooks/update failing in some way)
:repositories / reponame.git (假设默认
设置 - Gitolite V3 ,它总是$ REPO_BASE
〜/ repositories
) - 那就是,哟你使用了完整的unix路径。
由于上面提到的前缀不是必需的,因此shell会发现回购和克隆确定。
但是,当您推送时, gitolite的更新钩子启动并且无法运行,因为它所期望的一些环境变量不存在。
happens if you use
git@server:repositories/reponame.git
(assuming defaultsetting -- in Gitolite V3, it always is$REPO_BASE
~/repositories
) -- that is, you used the full unix path.
Since the "prefixing" mentioned above is not required, the shell finds the repo and clones ok.
But when you push, gitolite's update hook kicks in, and fails to run because some of the environment variables it is expecting are not present.
显示的消息在易安装程序的成功运行中明确包含以下警告:
The message that appears on a successful run of the "easy-install" program clearly includes the following warning:
*Your* URL for cloning any repo on this server will be
gitolite:reponame.git
*Other* users you set up will have to use
<user>@<server>:reponame.git
However, if your server uses a non-standard ssh port, they should use
ssh://<user>@<server>:<port>/reponame.git
所以在你的情况下,你必须克隆你的回购:
So in your case, you must have cloned your repo with:
git clone git@ganesh:repositories/testing.git
而不是:
instead of:
git@ganesh:testing.git
这篇关于gitolite推送错误 - >远程:ENV GL_RC未设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!