今天为了让cocoapods里的三方库适配iOS 10,所以打算升级三方,升级三方前需要先升级cocoapods。So I do it,app works fine.
但是当我准备提交代码到git的时候,终端叫我输入username和password,以前都没有这个要求的。好吧输就输,后面push的时候它又提示push失败:fatal: Authentication failed for 'https://github.com/CocoaPods/Specs.git/'
我一看,是cocoapods搞的鬼,于是谷歌。看到一条稍微有用的信息:first pull then push。
但是有件尴尬的事情:我已经commit,如果这时pull,就意味着今天的代码白敲了。我就想问你们有没有什么好的解决办法。
如果有解决办法也可以来这里分享下:http://stackoverflow.com/ques...
Finally I use
git remote set-url origin xxx
solve this problem.Why does pull cause your code to be wasted? Pull does not overwrite local code with remote code.
Owner, I encountered the same problem as you. How did you solve it? Please let me know, thank you!