[Source] Fix issue with spec repo without git remote

https://github.com/CocoaPods/CocoaPods/issues/2590