OSX Mavericks and Git Error

By Page Wood November 01, 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!


  1. C

    Thanks for the tip, worked like a champ. That was a pretty cryptic one.
    P.S. Great location to be a developer πŸ™‚

    • Page Wood
      Page Wood

      Glad to hear it helped someone else out! And yes, the North Shore is like a dream πŸ™‚

  2. Olivier

    Thanks a lot !

  3. Jen

    This worked for me! Thanks so much!

  4. Des

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

  5. Victor Aldabalde
    Victor Aldabalde

    Thanks a lot, man!

  6. Jonathan Beech
    Jonathan Beech

    Worked for me, thank you for that!

  7. Andrew

    Worked great! Thank you.

  8. Jaco Pretorius
    Jaco Pretorius

    Works perfectly, thanks!

  9. Joe Lance
    Joe Lance

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

  10. Sandy

    Thank you very much!

  11. 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
  12. hanoseok

    Thanks, It works for me.

  13. Jason Ellis
    Jason Ellis

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

  14. Carlos Carvajal
    Carlos Carvajal

    Thanks, It works!!!!

  15. Katherine

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

  16. Christoph

    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.

  17. Mehrad

    it saved lot of my time, thanks (y)

  18. Tom

    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.

  19. Fran

    Thanks for your post, It helped me a lot.

  20. Git error after updating Xcode - NixSOS
    Git error after updating Xcode - NixSOS
  21. Grunt build
    Grunt build

    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.


  22. Moses

    Thank you so,

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

  23. Nicolas Widart
    Nicolas Widart


    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?


  24. Nicolas Widart
    Nicolas Widart

    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.


  25. Nicolas Widart
    Nicolas Widart

    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. πŸ™‚

    • Page Wood
      Page Wood

      Anytime, glad to hear it’s all working as expected now πŸ™‚

  26. EDL

    Thanks! helpful

  27. Alex

    You da man!

  28. Saichand

    Thanks a ton. This worked for me.

  29. Avery

    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.


  30. Marianna

    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?

    • Page Wood
      Page Wood

      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.

  31. GBMan

    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?

  32. Denis

    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.

    • Page Wood
      Page Wood

      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!


Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *