【发布时间】:2020-07-12 13:57:19
【问题描述】:
我正在尝试将本地 Xcode 项目推送到 GitHub,但出现以下错误:
git push -u origin master
remote: Weak credentials. Please Update your password to continue using GitHub.
remote: See https://help.github.com/articles/creating-a-strong-password/.
fatal: unable to access 'https://github.com/josiah-brown/Test1.git/': The requested URL returned error: 403
我已经尝试将 url 更改为 ssh 而不是 https,但随后出现此错误:
Test $ git push -u origin master
Warning: Permanently added the RSA host key for IP address ' 140.82.113.3' to the list of known hosts.
git@github. com: permission denied (publickey)
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我已经在 GitHub 上更改了我的密码,以确保它不违反强密码要求,但这并没有解决问题。 有谁能帮忙吗?
【问题讨论】:
-
欢迎来到 Stack Overflow :) 通过运行
ssh -T git@github.com检查您是否可以成功建立与 GitHub 的连接。另外,运行ssh-add -K ~/.ssh/id_rsa(或将其替换为您的私钥的名称)以将 SSH 密钥添加到您的 SSH 代理,然后重试。 -
@phd 对不起,我之前回答的时候没有解决这个问题。我现在已经这样做了(Google Lens 派上用场了)
-
@phd 我一直在使用它,它就像魔术一样!
-
@NimeshNeema 我只需使用我的手机,打开镜头,选择文本并将其复制到谷歌文档。在我的计算机上,我打开同一个 Google 文档(由 Google 自动同步),然后...我从该 Google 文档中复制文本到您的问题中。
-
@filbranden Google Lens 也可以使用屏幕截图 (androidauthority.com/google-lens-screenshot-1029772):在您的手机上拍摄一张,然后在上面应用 Google Lens ;)