When running pod repo update the following error is generated:
Updating spec repo `master`
[!] Failed to connect to GitHub to update the CocoaPo
Finally managed to solve it by deleting ./cocoapods/repos/master and running pod install.
The more formal solution would probably go like this:
pod repo remove master
pod setup
pod install
If pod install fails after performing the first two steps, you may need to delete your Podfile.lock.
Why it initially failed to connect to Github is beyond me.