IDEA Mac OSX: can't start Git after updating Mac OS/XCode

原文: https://intellij-support.jetbrains.com/hc/en-us/articles/207241205-Mac-OSX-can-t-start-Git-after-updating-Mac-OS-XCode

描述
The IDE is giving an error message that it "can't start git: /usr/bin/git", however the path is correct, and it was working before. idea.log contains the following error: ''Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo''

解决
OSX Mavericks and Git Error
Posted November 1, 2013
by Page Wood & filed under Web Development.

The software project that I have been working on for the past few months is being built inLaravel 4. With the new edition of Laravel 4, bundles are now being built as packages which are pulled into the project via Composer. What’s that mean? It’s like building chunks of the software into plugins that can be re-used for other projects… Nifty.
I do all of my local dev work using MAMP on Mac OSX, and we use GitHub for version control. Periodically, I have to crack open Terminal and update composer to pull in the latest versions of our Laravel Packages. Being that I’m the Front-End guy on the team, I don’t use Windows like the rest of the crew… So when something goes wrong with Git and OSX, I’m typically left to my own devices and some Google Searches.
The other day I updated my Mac to the new OSX Mavericks, which is an awesome free upgrade (thanks Apple)! Unfortunately, this upgrade did cause a few odd things to happen with my mac. First, I had to re-install Java to open any of my Creative Suite Applications. Next, my Composer updates suddenly stopped working.
When I went to update the Vendor folder with all of the packages in the local Dev environment, I ran into an issue. I ran the usual, php composer.phar install
command after dumping the vendor folder and composer.lock folder, only to face a big red error. Man, those red errors are scary, especially for someone who just started learning to use command line a couple of months ago.

That error didn’t make much sense to me, except that Git was apparently not found. First I tried to run my install script in a different way: php phar.composer install --prefer-dist
compliments of this thread. No luck.
I looked at the error a bit more…
“Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.”

– What?

Ah! Ok, X-code was obviously re-installed with OSX Mavericks. So the answer to this issue is simple. I simply had to run:

sudo xcodebuild -license

****This allowed me to view the X-code licence, and then agree to the terms.** Voila, that’s it. Everything worked just fine after that.
I’ve since sent this quick fix to my dev friends using GitHub and the Mac. Hope this helps someone else out there!

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 9,934评论 0 23
  • PLEASE READ THE FOLLOWING APPLE DEVELOPER PROGRAM LICENSE...
    念念不忘的阅读 13,551评论 5 6
  • 和Y已经有一年没有见面了,虽然同在一座城市。 这次我们约在一家咖啡馆,说好的下午5点见。但是鉴于她从前不守时的习惯...
    柠檬江江阅读 192评论 0 0
  • 你看 快看 看那肆意席卷而来 带着怒气的风 拉扯着乌云姑娘的手 扬着沙尘 放纵的击打着它 是因为觊觎枝叶的美貌吗 ...
    哓霞阅读 338评论 0 1
  • 昨天听了会员分享的耿峰老师讲得产品目录,记了四页笔记,知道了不少产品使用的小窍门,之后分享到自己的会员群里了 宝宝...
    林霂阅读 321评论 0 0