When running pod repo update the following error is generated:
Updating spec repo `master`
[!] Failed to connect to GitHub to update the CocoaPo
A another solution similar to Max's and Adem's in this thread is found in a CocoaPods issue:
brew install ruby
sudo gem install cocoapods
Verify that you're using the latest and correct Ruby with:
ruby --version
which ruby
Should be using /usr/local/bin/ruby
Reason: It turns out that Github updated to only support TLS 1.2 on Feb 22nd. Older versions of MacOS before High Sierra come preinstalled with Ruby 2.0. This version uses OpenSSL 0.9.8 which "will fail with servers supporting only TLS 1.2."
Updating to the latest Ruby (2.5) and latest CocoaPods (1.4) fixed this for me without having to do anything with openssl (Ruby updates openssl). This is a good solution if you don't want to update to High Sierra just yet.