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.
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
November 8, 2013 4:25 amThanks for the tip, worked like a champ. That was a pretty cryptic one.
P.S. Great location to be a developer :-)
Page Wood
November 8, 2013 9:32 amGlad to hear it helped someone else out! And yes, the North Shore is like a dream :)
Olivier
November 19, 2013 2:05 amThanks a lot !
Jen
December 14, 2013 6:50 pmThis worked for me! Thanks so much!
Des
February 12, 2014 12:10 amThanks for the tip! There should be something telling you to run that command. So inconvenient.
Victor Aldabalde
February 12, 2014 4:54 pmThanks a lot, man!
Jonathan Beech
February 19, 2014 7:55 pmWorked for me, thank you for that!
Andrew
February 20, 2014 6:53 pmWorked great! Thank you.
Jaco Pretorius
February 22, 2014 1:56 amWorks perfectly, thanks!
Joe Lance
March 2, 2014 4:02 pmThanks so much for posting this. Was truly puzzling to this n00b.
Sandy
March 11, 2014 7:22 pmThank you very much!
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 […]
hanoseok
April 11, 2014 8:53 amThanks, It works for me.
Jason Ellis
May 8, 2014 8:00 amThanks a lot man! Don't know if I would've ever figured this one out on my own.
Carlos Carvajal
June 27, 2014 9:59 amThanks, It works!!!!
Katherine
September 2, 2014 6:08 pmThanks so much for the tip! worked great! I love when developers share! K.
Christoph
September 21, 2014 2:39 amJust start Xcode and accept the Licence. I had to install some updates, but after quitting Xcode I was able to use git as usual.
Mehrad
September 22, 2014 2:32 amit saved lot of my time, thanks (y)
Tom
September 23, 2014 9:49 amWhew. 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.
Fran
September 26, 2014 9:34 amThanks for your post, It helped me a lot.
Git error after updating Xcode - NixSOS
September 27, 2014 3:00 am[…] http://pagegwood.com/web-development/osx-mavericks-git-error […]
Grunt build
September 30, 2014 8:44 pmThanks 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
Moses
October 5, 2014 6:37 amThank you so,
And to echo Tom: And thanks for having good enough SEO to appear high in my Google search.
Nicolas Widart
October 27, 2014 12:19 amHi,
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
Page Wood
October 27, 2014 3:35 pmHi 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
Nicolas Widart
October 27, 2014 10:06 pmI 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,
Page Wood
October 29, 2014 3:34 amNicholas, 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/
Nicolas Widart
November 2, 2014 11:15 pmThanks 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
November 17, 2014 7:03 amAnytime, glad to hear it's all working as expected now :)
EDL
November 27, 2014 4:37 pmThanks! helpful
Alex
December 2, 2014 8:08 amYou da man!
Saichand
March 30, 2015 6:52 amThanks a ton. This worked for me.
Avery
June 3, 2015 8:34 amFrom 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,
Marianna
June 9, 2015 4:03 amWhen 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
June 10, 2015 2:17 pmHey 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.
GBMan
September 24, 2015 4:16 amThanks for the tip.
Am I the only one to find very weird and intrusive IntelliJ can't work because of an XCode license agreement?
Denis
October 2, 2015 1:33 amThe 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
October 2, 2015 2:28 amDenis, 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