Git on MacOS gives funny error

I run into this error today, when I tried to set up git for my newly updated/installed Android Studio:

SunUComp-MBP:MyApp sianlunl$ git --init

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

After searching a while on Google, I found this article:  Apparently it is a "side-effect" after an MacOs/Xcode update (i have only upgraded to Sierra last week). All we need, according to the article, is to execute the following command in the Mac Terminal:

sudo xcodebuild -license

and then agree to the terms and condition for xcode. Git should now works as before.

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.