在git pull上的OSX 10.10优胜美地测试版:git-sh-setup:没有这样的文件或目录 [英] OSX 10.10 yosemite beta on git pull: git-sh-setup: No such file or directory

查看:195
本文介绍了在git pull上的OSX 10.10优胜美地测试版:git-sh-setup:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

升级到OSX 10.10 Yosemite Beta后,运行 git pull 返回以下错误:


/ Library / Developer / CommandLineTools / usr / libexec / git-core / git-pull:第11行:git-sh-setup:没有这样的文件或目录

我检查了引用的git-core目录,并且git-sh-setup.sh在那里。



其他git命令完全按照预期工作

解决方案

我认为现在最干净的解决方案是更改iTerm会话中的初始命令

  / usr / bin / login -f<您的用户名> 

这解决了我的问题。



进一步分析问题的数据点:似乎在10.10中,存在PATH环境变量的多个副本,并且子壳似乎更喜欢第二个副本。

您可以通过在iTerm启动的控制台上启动任何可可应用程序来重现此操作。你会得到如下警告:

] *** - [NSProcessInfo环境]:警告:在环境中找到的键'PATH'的重复定义 - 后续定义将被忽略。第一个定义是'(我在shell中配置的路径)',忽略的定义是'/ usr / bin:/ bin:/ usr / sbin:/ sbin'。

我认为这是10.10中的问题,而不是iTerm,但iTerm正在做的事情是导致它以显示自己(这不会发生在Terminal.app中)



更新:这是由iTerm对有趣环境。更新到iTerm 2.0的正式版本,以解决此问题。


After upgrading to OSX 10.10 Yosemite Beta, running git pull is returning the following error:

/Library/Developer/CommandLineTools/usr/libexec/git-core/git-pull: line 11: git-sh-setup: No such file or directory

I've checked the referenced git-core directory and the git-sh-setup.sh is there.

Other git commands are working exactly as expected

解决方案

I think the cleanest solution for this for now is to change the initial command in your iTerm session to be

/usr/bin/login -f <your user name>

This fixes the issue for me.

A further data point for analysis of the issue: It seems that in 10.10, multiple copies of the PATH environment variable exist and subshells seem to prefer the second copy.

You can reproduce this by launching any cocoa application on the console as launched by iTerm. You'll get a warning that looks like this:

2014-06-04 19:23:09.859 gitx[14676:362580] *** -[NSProcessInfo environment]: Warning: duplicate definition for key 'PATH' found in environment -- subsequent definitions are ignored.  The first definition was '(the path I have configured in my shell)', the ignored definition is '/usr/bin:/bin:/usr/sbin:/sbin'.

I believe this to be a problem in 10.10 and not iTerm, but something iTerm is doing is causing it to manifest itself (this doesn't happen in Terminal.app)

Update: This is caused by iTerm doing "interesting" stuff to the environment. Update to the official release of iTerm 2.0 to make this problem go away.

这篇关于在git pull上的OSX 10.10优胜美地测试版:git-sh-setup:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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