Git错误:找不到程序:u'bash' [英] Git Error: Couldn't find program: u'bash'

查看:87
本文介绍了Git错误:找不到程序:u'bash'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Windows 10机器上安装Git.我不知道如何将bash.exe文件放在我的Git路径中(或者甚至真的不知道那是什么意思).我正在使用IPython Nootebook 2.7运行以下代码:

I am installing Git on a Windows 10 machine. I do not know how to place the bash.exe file in my Git path (or even really know what that means). I am using IPython Nootebook 2.7 to run the following codes:

import os 
os.environ['path']+="C:\Program Files\Git\\bin"

并运行:

%%bash
cd /tmp
rm -rf Testing
git clone git@github.com:rahuldave/Testing.git

我收到以下错误消息:

Couldn't find program: u'bash'

最后,我运行了这段代码:

Finally, I ran this code:

%%bash
ls /tmp/Testing

我收到了相同的错误消息.

and I received the same error message.

任何帮助将不胜感激.

推荐答案

Jim,看来我们在同一类中,并且对相同的初始配置进行故障排除.在我的Windows 7环境中对我有用的是转义所有斜杠(而不仅仅是... \ bin)并添加';'.分隔路径,例如

Jim, looks like we are in the same class and troubleshooting the same initial configuration. What worked for me in my Windows 7 environment, was to escape all slashes (not just ...\bin) and add ';' to separate the path, e.g.

os.environ['path']+=";C:\\Program Files\\Git\\bin"

此外,您可能需要为git执行提供完整的bash路径,例如

Also, you may need to provide the full bash path for git execution, e.g.

/c/'Program Files'/Git/bin/git clone git@github.com:yourusername/Testing.git

这篇关于Git错误:找不到程序:u'bash'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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