Tried all of the answers on here. I was trying to add cocoapods onto my machine.
I didn't have an SSH key so thanks @Do Nhu Vy
https://stackoverflow.com/a/38703069/2481602
And finally used
git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master
to finally fix the issue found https://stackoverflow.com/a/50959034/2481602