iosgitcocoapodscocoapods-1.0.1iosdeployment

Git push failed when I updated the cocoaPods


In order to fit iOS 10,I have to update these 3-part in cocoaPods,so I had updated the cocoaPods to it's newest version.APP works fine,but when I use git push, the terminal require me to input username and password for github,however,the terminal showed:

fatal: Authentication failed for 'https://github.com/CocoaPods/Specs.git/'.

I am sure the username and password I put into is right.

Before I asked this question here I had ask for help on Google and find a solution:Pull first,then push.

But the embarrassing thing is that I had commit my code.That is to say,if I use git pull I will lose all my work today,that's terrible,so I wonder if there any better way to solve it.

When I hit git remote -v in terminal there showed something interesting:

origin https://github.com/CocoaPods/Specs.git (fetch) origin https://github.com/CocoaPods/Specs.git (push)

I am surprised about how cocoaPods changed my project's remote url?


Solution

  • Finally I use git remote set-url origin xxx solve this problem.