OSX Mavericks and Git Error

By Page Wood November 1, 2013

The software project that I have been working on for the past few months is being built in Laravel 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.

Git Error X-Code

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!


38 Comments

C
C
November 8, 2013 4:25 am

Thanks for the tip, worked like a champ. That was a pretty cryptic one.
P.S. Great location to be a developer :-)

Reply
Page Wood
Page Wood
November 8, 2013 9:32 am

Glad to hear it helped someone else out! And yes, the North Shore is like a dream :)

Reply
Olivier
Olivier
November 19, 2013 2:05 am

Thanks a lot !

Reply
Jen
Jen
December 14, 2013 6:50 pm

This worked for me! Thanks so much!

Reply
Des
Des
February 12, 2014 12:10 am

Thanks for the tip! There should be something telling you to run that command. So inconvenient.

Reply
Victor Aldabalde
Victor Aldabalde
February 12, 2014 4:54 pm

Thanks a lot, man!

Reply
Jonathan Beech
Jonathan Beech
February 19, 2014 7:55 pm

Worked for me, thank you for that!

Reply
Andrew
Andrew
February 20, 2014 6:53 pm

Worked great! Thank you.

Reply
Jaco Pretorius
Jaco Pretorius
February 22, 2014 1:56 am

Works perfectly, thanks!

Reply
Joe Lance
Joe Lance
March 2, 2014 4:02 pm

Thanks so much for posting this. Was truly puzzling to this n00b.

Reply
Sandy
Sandy
March 11, 2014 7:22 pm

Thank you very much!

Reply
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo. | Hanoseok's Blog
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo. | Hanoseok's Blog
April 11, 2014 8:53 am

[…] http://pagegwood.com/web-development/osx-mavericks-git-error […]

Reply
hanoseok
hanoseok
April 11, 2014 8:53 am

Thanks, It works for me.

Reply
Jason Ellis
Jason Ellis
May 8, 2014 8:00 am

Thanks a lot man! Don't know if I would've ever figured this one out on my own.

Reply
Carlos Carvajal
Carlos Carvajal
June 27, 2014 9:59 am

Thanks, It works!!!!

Reply
Katherine
Katherine
September 2, 2014 6:08 pm

Thanks so much for the tip! worked great! I love when developers share! K.

Reply
Christoph
Christoph
September 21, 2014 2:39 am

Just start Xcode and accept the Licence. I had to install some updates, but after quitting Xcode I was able to use git as usual.

Reply
Mehrad
Mehrad
September 22, 2014 2:32 am

it saved lot of my time, thanks (y)

Reply
Tom
Tom
September 23, 2014 9:49 am

Whew. Thanks for your post. And thanks for having good enough SEO to appear high in my Google search. The panic that I had broken something was palpable.

Reply
Fran
Fran
September 26, 2014 9:34 am

Thanks for your post, It helped me a lot.

Reply
Git error after updating Xcode - NixSOS
Git error after updating Xcode - NixSOS
September 27, 2014 3:00 am

[…] http://pagegwood.com/web-development/osx-mavericks-git-error […]

Reply
Grunt build
Grunt build
September 30, 2014 8:44 pm

Thanks dude, I suddenly was not able to perform a Grunt build command anymore (as it requires git). When I read your post I recalled seeing this nice growl message this morning telling me xcode had been updated.

This fixed it.

Thanks

Reply
Moses
Moses
October 5, 2014 6:37 am

Thank you so,

And to echo Tom: And thanks for having good enough SEO to appear high in my Google search.

Reply
Nicolas Widart
Nicolas Widart
October 27, 2014 12:19 am

Hi,

Thanks for the tip. It works but now whenever I'm in a git directory, all my CLI est extremely slow.
Even a simple 'return' with no command takes ~14seconds. I can't even see me type in real time.
Any reason for this?

Thanks

Reply
Page Wood
Page Wood
October 27, 2014 3:35 pm

Hi Nicholas, sorry to hear that! Can't say that I know off-hand what might be causing your speed issue... I found this on Stack Overflow, maybe give it a shot? http://stackoverflow.com/questions/4485059/git-bash-is-extremely-slow-in-windows-7-x64

Reply
Nicolas Widart
Nicolas Widart
October 27, 2014 10:06 pm

I tried looking on the web for answers, haven't found anything that fixed the issue yet.

Your link gives some pointers, but for windows. I'm using a Mac. I've tried those 3 commands just in case but it's still extremely slow.

Thanks,

Reply
Page Wood
Page Wood
October 29, 2014 3:34 am

Nicholas, are you using the Git that came pre-installed on OSX? If so, you could try removing that and installing an updated version via Homebrew: http://kj-prince.com/code/install-git-mac-osx-homebrew/

Reply
Nicolas Widart
Nicolas Widart
November 2, 2014 11:15 pm

Thanks Page for the help. I've finally chosen to remove Yadr (https://github.com/skwp/dotfiles) and perform a clean install. Everything seems to be working fine again. :)

Reply
Page Wood
Page Wood
November 17, 2014 7:03 am

Anytime, glad to hear it's all working as expected now :)

Reply
EDL
EDL
November 27, 2014 4:37 pm

Thanks! helpful

Reply
Alex
Alex
December 2, 2014 8:08 am

You da man!

Reply
Saichand
Saichand
March 30, 2015 6:52 am

Thanks a ton. This worked for me.

Reply
Avery
Avery
June 3, 2015 8:34 am

From a newbie, THANK YOU!!! I was very stuck, and never would have figured this out. Being stuck sucks and were officially in a small group of people needing more technical help. New coder in training here.

Avery,

Reply
Marianna
Marianna
June 9, 2015 4:03 am

When i try to run this to my terminal i get a password
were i can type actually anothing , when i press enter i get fail up to 3 times and then from the begining again. What am i missing here?

Reply
Page Wood
Page Wood
June 10, 2015 2:17 pm

Hey Marianna! When you type password entries into terminal, no characters are shown but the characters are still entered. Just type your admin password, then hit enter and you should be good to go.

Reply
GBMan
GBMan
September 24, 2015 4:16 am

Thanks for the tip.
Am I the only one to find very weird and intrusive IntelliJ can't work because of an XCode license agreement?

Reply
Denis
Denis
October 2, 2015 1:33 am

The post didn't helped me.
Maybe it is to old, maybe I have a different issue.
I just updated to El Capitan and my Git in Intellij IDEA 14 stopped working. It said that Git can't start, because the path is incorrect, but is was.
So "sudo xcodebuild -license" resulted in a "xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance".
I simply don't have XCode and I don't need it.
The solution I found helped.
In terminal type
xcode-select --install
and then click on "install", not "Get Xcode". Git worked fine after that.
Will just leave it here since it is one of the first link in goolge.

Reply
Page Wood
Page Wood
October 2, 2015 2:28 am

Denis, you're right - you can either install Xcode or Command line tools to use Git on a mac. Looks like you opted for command line tools. I personally always install Xcode because of its built in device simulators that are great for debugging front-end code on ios devices. Glad you were able to get things going!

Reply

Leave a Comment