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 was also facing the same problem. I solved it only by accessing two commands from terminal.
sudo gem uninstall nanaimo
and then
sudo gem install nanaimo
Hope so it will help.