Few days back I updated my Xcode and today when I opened my IDE to start coding, I realized the IDE is not recognising Git on my computer, so I tried to run git in terminal:
git --version
and I got the following error:
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
so I search internet and I found this brief and helpful post:
http://mynameispagewood.com/web-development/osx-mavericks-git-error
He has explained what to do and I’m going to explain my experience in details, but I will appreciate if you cite him and his website regarding of this matter.
So the code PageWood suggested was:
sudo xcodebuild -license
You can clearly see what this command is suppose to do. You will see the following result:
You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode.
Hit the Enter key to view the license agreements at ‘/Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf’
You will see the license agreement for xcode by hitting
IMPORTANT: BY USING THIS SOFTWARE, YOU ARE AGREEING TO BE BOUND BY THE FOLLOWING APPLE TERMS:
A. MAC SDK AND XCODE AGREEMENT
B. iOS SDK AGREEMENTAPPLE INC.
MAC SDK AND XCODE AGREEMENT
as you can see there is no agree button and you should scroll down until the end of the agreement, the easiest way is to press and hold
By typing ‘agree’ you are agreeing to the terms of the software license agreements. Type ‘print’ to print them or anything else to cancel, [agree, print, cancel]
which is self explanatory and asks you to type agree to accept the Xcode agreement and proceed.
At this point you can try the command below to check if your git is functional again:
git --version
Don’t forget to visit and cite this posts.
Cheers;