gpt4 book ai didi

ios - Xcode 11 SPM 身份验证失败,因为未提供凭据

转载 作者:行者123 更新时间:2023-12-01 22:34:17 25 4
gpt4 key购买 nike

我开始使用 Swift 包管理器,当我使用 https ( https://github.com/Alamofire/Alamofire.git ) 添加存储库时,当我尝试使用我的 github 帐户登录时,地址验证总是失败

Xcode authentication fail

但是如果我使用 git@github.com:Alamofire/Alamofire.git 它将成功添加。我尝试重新生成新 key ,删除 .ssh 目录,但没有任何东西使 https 工作,并且我仍然收到 xcode 身份验证失败,因为没有提供凭据错误。我可以在本地使用 ssh url,但在 CI 中我需要一个带有 https 的 ssh url。

最佳答案

这是 git 配置的问题。在 .gitconfig 文件中它被设置为

[url "git@github.com:"]
insteadOf = https://github.com/

删除此部分后,https 可以正常工作

编辑:正如评论中提到的,您可以使用命令轻松地在终端中访问 gitconfig:git config --global --edit

关于ios - Xcode 11 SPM 身份验证失败,因为未提供凭据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58165880/

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