When running pod repo update the following error is generated:
pod repo update
Updating spec repo `master` [!] Failed to connect to GitHub to update the CocoaPo
I also encountered the same issue. In my scene, i used a mirror repo (hosted elsewhere) of cocoapods specs on github. When i updated the specs repo, it worked!
cd ~/.cocoapods/repos/master git pull