Git推送到cpanel服务器 - git-receive-pack:命令未找到 [英] Git pushing to cpanel server - git-receive-pack: command not found

查看:779
本文介绍了Git推送到cpanel服务器 - git-receive-pack:命令未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试设置一个GIT环境来实现以下功能:


  1. 存储代码的位置(使用Gitorious进行设置和使用)

  2. 服务器上的生产和临时环境(服务器设置)

  3. b

我的制作和分段服务器是一个cpanel服务器,我跟着这个人建议设置它。



所有似乎都很好,但我一直得到以下错误:

stdin:不是tty
bash:git-receive-pack:找不到命令
致命的:无法从远程存储库读取。



我知道的第一行只是一个被忽略的bash。第二个问题,我遵循这篇文章中的建议:推动和现有项目进入裸露回购,我很难过。


  1. 什么是git-receive-pack?
  2. 它位于哪里?

  3. 如果它不在任何位置,我该如何处理它?<​​/ 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:

  1. Repo where my code is stored (setup and working using Gitorious)
  2. A production and staging environment on a server (server setup)
  3. 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.

  1. What is a "git-receive-pack"
  2. Where is it located?
  3. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆