OK, turns out all I had to do was open the XCode app, and enter my password, then the command-line tools worked.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: