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
For me the below commands fixed the issue
Removing cocoapods from mac
sudo gem uninstall cocoapods
Installing cocoapods on mac
sudo gem install cocoapods