Package Control error with SublimeText

Recently we came across an issue with the SublimeText Package Control module. It turns out that for those of us with Xcode installed need to agree to apples terms and conditions before using Xcode components. In this case, git is packaged and distributed with Xcode. This means that each time Apple changes their terms and conditions, we need to agree to the before using it's git version on our systems.

It's worth noting that some Git GUI's like Tower and SourceTree come bundled with their own Git versions that don't have this requirement.

The error when running Package Control

Package Control

Error executing: /usr/bin/git symbolic-ref -q HEAD

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

VCS-based packages can be ignored with the "ignore_vcs_packages" setting.

The solution

In a terminal window, run the following command:

sudo xcodebuild -license

Once the license is displayed in the terminal window, hit q, then type agree when prompted. You'll now be able to use Package Control again!

Something to say?