在Windows中找不到git-receive-pack:命令 [英] git-receive-pack: command not found in Windows

查看:596
本文介绍了在Windows中找不到git-receive-pack:命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



当我尝试使用命令git push origin master时,我得到了


git-receive-pack:找不到命令

可以在Windows中修复这个问题?



GIT的路径在c:/ program files / Git / Bin /但不确定如何设置?





编辑


git - exec-path

c:\程序文件\Git / libexec / git-core

现在如何设置这个地方?

解决方案

我在尝试执行git时遇到类似问题从另一台Win-7机器拉出来。以下是我所做的:


  • 为了通过Git与远程存储库进行交互,需要将Git目录添加到REMOTE计算机的Windows PATH环境变量(这应该在任何运行Git并需要克隆,推送或拉动的Windows机器上完成)

  • 要添加的Git目录(到目前为止):


    .. \git\bin,
    ..\\git\libexec\git-core,
    。 。\git\cmd



  • 要修改Windows-7路径,请使用以下命令:


    单击开始,然后右键单击计算机并选择属性,
    在左侧面板上选择高级系统设置,
    在系统属性对话框中,单击环境变量...按钮
    从系统变量列表中选择路径,然后单击编辑按钮




将所需的路径添加到现有路径字符串的末尾使用分号作为分隔符。注意:路径需要从磁盘根目录(例如C:)指定。


Wondering how to fix this problem in Windows ?

When i try and use the command "git push origin master" I get

git-receive-pack: command not found

Any idea how I can fix this in windows ?

The path to GIT is in c:/program files/Git/Bin/ but unsure how to set this ?

Thx

Edit: doing

git--exec-path
c:\Program Files\Git/libexec/git-core

Now how to setup this somewhere?

解决方案

I had a similar problem when trying to execute a git pull from another Win-7 machine. Here's what I did:

  • In order to interact with remote repositories via Git, the Git directories need to be added to the REMOTE machine's Windows PATH environmental variable (this should be done for any Windows machine running Git and needing to clone, push, or pull)
  • Git directories to add (so far):

    ..\git\bin, ..\git\libexec\git-core, ..\git\cmd

  • To modify the Windows-7 path, use the following:

    Click Start, then right-click on "Computer" and select "Properties", On the left panel, select "Advanced system settings", In the System Properties dialog, click on the "Environmental Variables…" button, Select "Path" from the "System variables list", and click the "Edit" button

Add the needed paths to the end of the existing Path string using a semi-colon as the delimiter. Note: the path needs to be specified from the disk root (e.g. C:).

这篇关于在Windows中找不到git-receive-pack:命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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