gpt4 book ai didi

ios - 更新cocoaPods时Git推送失败

转载 作者:行者123 更新时间:2023-12-01 20:02:03 25 4
gpt4 key购买 nike

为了适应iOS 10,我必须在cocoaPods中更新这三部分,所以我已经将cocoaPods更新到了最新版本.APP正常运行,但是当我使用git push时,终端要求我输入github的用户名和密码但是,终端显示:
fatal: Authentication failed for 'https://github.com/CocoaPods/Specs.git/'

我确定输入的用户名和密码正确。

在我问这个问题之前,我曾在Google寻求帮助并找到了解决方案:Pull first,then push

但是令人尴尬的是,我已经提交了代码。也就是说,如果我使用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 - 更新cocoaPods时Git推送失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39764303/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com