Git推送到cpanel服务器 - git-receive-pack:命令未找到 [英] Git pushing to cpanel server - git-receive-pack: command not found
问题描述
我尝试设置一个GIT环境来实现以下功能:
- 存储代码的位置(使用Gitorious进行设置和使用)
- 服务器上的生产和临时环境(服务器设置)
- b
我的制作和分段服务器是一个cpanel服务器,我跟着这个人建议设置它。
所有似乎都很好,但我一直得到以下错误:
stdin:不是tty
bash:git-receive-pack:找不到命令
致命的:无法从远程存储库读取。
我知道的第一行只是一个被忽略的bash。第二个问题,我遵循这篇文章中的建议:推动和现有项目进入裸露回购,我很难过。
- 什么是git-receive-pack?
- 它位于哪里?
- 如果它不在任何位置,我该如何处理它?</ li>
如果我运行ssh user@0.0.0.0这个git-receive-pack,它会返回:no git-receive-pack in ...,当我从shell运行相同的命令时,我得到了同样的答案。
我是否grep服务器来查找文件?
感谢任何帮助。
基本上我将以下内容添加到我的git文件中:
url = root@server.location.com:/home/folder/git/staging.git
receivepack = / usr / local / cpanel / 3rdparty / bin / git-receive-pack
fetch = + refs / heads / *:refs / remotes / staging / *
为了使这个过程更加流畅,我还将我的计算机SSH密钥添加到了服务器中,因此我不再需要输入密码。
I am attempting to setup a GIT environment to achieve the following:
- Repo where my code is stored (setup and working using Gitorious)
- A production and staging environment on a server (server setup)
- Local repo on my computer (working)
My production and staging server is a cpanel server and I followed this guys suggestions set it up.
All seems fine however I keep getting the following error:
stdin: is not a tty bash: git-receive-pack: command not found fatal: Could not read from remote repository.
The first line I know is just a bash thing to be ignored. The second issue I have followed the suggestions in this post: Pushing and existing project into bare repo and I am stumped.
- What is a "git-receive-pack"
- Where is it located?
- If it is not located anywhere, how do I get my hands on it?
If I run ssh user@0.0.0.0 which git-receive-pack, this returns: "no git-receive-pack in ... ", and when I run the same command from shell, I get the same answer.
Do I grep the server to find the file??
Appreciate any help.
This question on SO helped me to solve this problem: Git on godaddy - git-upload-pack not found
Essentially I added the following to my git file:
url = root@server.location.com:/home/folder/git/staging.git
receivepack = /usr/local/cpanel/3rdparty/bin/git-receive-pack
fetch = +refs/heads/*:refs/remotes/staging/*
To make this process smoother I additionally added my computers SSH key to the server so I no longer need to enter a password.
这篇关于Git推送到cpanel服务器 - git-receive-pack:命令未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!