Git Push 命令不适用于 msysgit 设置
我按照以下说明将 GIT 安装到 Windows 2k8 服务器上:http://code.google.com /p/tortoisegit/wiki/HOWTO_CentralServerWindowsXP
除“push”命令外,所有命令都可以正常工作。我收到此错误:
git.exe push -v "origin" master:master
git: '/path/to/repo' is not a git command.请参阅“git --help”。 推送到 user@ipaddress/path/to/repo 致命:远程端意外挂起
有谁知道如何解决这个问题?
I installed GIT onto my windows 2k8 server following these directions: http://code.google.com/p/tortoisegit/wiki/HOWTO_CentralServerWindowsXP
All commands work fine except the "push" command. I get this error:
git.exe push -v "origin" master:master
git: '/path/to/repo' is not a git command. See 'git --help'.
Pushing to user@ipaddress/path/to/repo
fatal: The remote end hung up unexpectedly
Does anyone know how to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看起来远程
来源
设置不正确。我建议重新创建该遥控器,方法是重命名它或删除它并创建一个新遥控器:
然后再试一次,最好在推送之前先进行提取。
您使用什么协议?如果是
git://
,则确保有一个 Git 守护进程正在侦听连接。如果是ssh://
,请确保您具有 ssh 访问权限以及对相应目录树的写入权限。另一种可能性是服务器和客户端运行不同版本的 Git。如果一个版本运行的命令需要
git cmd
格式的命令,而另一个版本需要git-cmd
格式的命令,则可能会导致问题。It looks like the remote
origin
is not set up correctly.I recommend re-creating that remote, either by renaming it or deleting it and making a new one:
Then try again, preferably with a fetch before you push.
What protocol are you using? If
git://
, then make sure there is a Git daemon listening for connections. Ifssh://
, make sure you have ssh access and write permission on the appropriate directory tree.Another possibility is that the server and client are running different versions of Git. It could cause problems if one is running a version that expects commands in the format
git cmd
and the other expectsgit-cmd
.首先检查您对
5.16.217.81
的普通 SSH 访问是否正常:是否能够打开与主机的连接?
如果成功,请确保以 SSH 服务器理解的方式指定存储库的路径。在 HowTo 中,指定的路径与您键入的路径不同:
5.16.217.81/d/private/test/
(你的路径)与显然,CopSSH 服务器需要冒号来分隔驱动器来自主机的信件,因此您的 URL 应为
5.16.217.81:d:/private/test/
。如果您使用 Cygwin,您的 URL 将为
5.16.217.81/cygdrive/d/private/test/
First check, if your plain SSH access to
5.16.217.81
is working: isable to open a connection to the host?
If that is successful, ensure that you specify the path to your repo in a way your SSH server understands. In the HowTo, the path is specified different from the path you typed:
5.16.217.81/d/private/test/
(your path) vs.<server>:d:/DeeDriveRepos/Repo2
Obviously, the CopSSH server wants colons to separate the drive letter from the host, so that your URL should be
5.16.217.81:d:/private/test/
.If you used Cygwin, your URL would be
5.16.217.81/cygdrive/d/private/test/
我的推送适用于 msysgit 版本 1.6.5,但不适用于 1.7.x
My pushes work for msysgit version 1.6.5 but not for 1.7.x