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
Thanks for the tip, worked like a champ. That was a pretty cryptic one.
P.S. Great location to be a developer π
Glad to hear it helped someone else out! And yes, the North Shore is like a dream π
Thanks a lot !
This worked for me! Thanks so much!
Thanks for the tip! There should be something telling you to run that command. So inconvenient.
Thanks a lot, man!
Worked for me, thank you for that!
Worked great! Thank you.
Works perfectly, thanks!
Thanks so much for posting this. Was truly puzzling to this n00b.
Thank you very much!
[…] https://pagegwood.com/web-development/osx-mavericks-git-error […]
Thanks, It works for me.
Thanks a lot man! Don’t know if I would’ve ever figured this one out on my own.
Thanks, It works!!!!
Thanks so much for the tip! worked great! I love when developers share! K.
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.
it saved lot of my time, thanks (y)
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.
Thanks for your post, It helped me a lot.
[…] https://pagegwood.com/web-development/osx-mavericks-git-error […]
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
Thank you so,
And to echo Tom: And thanks for having good enough SEO to appear high in my Google search.
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
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
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,
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/
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. π
Anytime, glad to hear it’s all working as expected now π
Thanks! helpful
You da man!
Thanks a ton. This worked for me.
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,
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?
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.
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?
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.
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