Git 更新 cocoaPods 时推送失败
Git push failed when I updated the cocoaPods
为了适应 iOS 10,我必须在 cocoaPods 中更新这三部分,所以我已经将 cocoaPods 更新到最新的 version.APP 工作正常,但是当我使用 git push
,终端要求我输入 github 的用户名和密码,但是,终端显示:
fatal: Authentication failed for 'https://github.com/CocoaPods/Specs.git/'
.
我确定输入的用户名和密码是正确的。
在我在这里问这个问题之前,我曾在 Google 上寻求帮助并找到了解决方案:Pull first,then push
.
但尴尬的是我已经提交了我的 code.That 就是说,如果我使用 git pull
我将失去我今天所有的工作,那太糟糕了,所以我想知道是否有更好的解决方法。
当我在终端中点击 git remote -v
时,出现了一些有趣的东西:
origin https://github.com/CocoaPods/Specs.git (fetch)
origin https://github.com/CocoaPods/Specs.git (push)
我很惊讶 cocoaPods 如何改变我项目的远程 url?
最后我用git remote set-url origin xxx
解决了这个问题
为了适应 iOS 10,我必须在 cocoaPods 中更新这三部分,所以我已经将 cocoaPods 更新到最新的 version.APP 工作正常,但是当我使用 git push
,终端要求我输入 github 的用户名和密码,但是,终端显示:
fatal: Authentication failed for 'https://github.com/CocoaPods/Specs.git/'
.
我确定输入的用户名和密码是正确的。
在我在这里问这个问题之前,我曾在 Google 上寻求帮助并找到了解决方案:Pull first,then push
.
但尴尬的是我已经提交了我的 code.That 就是说,如果我使用 git pull
我将失去我今天所有的工作,那太糟糕了,所以我想知道是否有更好的解决方法。
当我在终端中点击 git remote -v
时,出现了一些有趣的东西:
origin https://github.com/CocoaPods/Specs.git (fetch)
origin https://github.com/CocoaPods/Specs.git (push)
我很惊讶 cocoaPods 如何改变我项目的远程 url?
最后我用git remote set-url origin xxx
解决了这个问题