无法将本地存储库推送到GitHub(返回错误403) [英] Cannot push local repository to GitHub (returning error 403)
问题描述
我试图将本地Xcode项目推送到GitHub,但遇到以下错误:
I am trying to push a local Xcode project to GitHub but am getting the following error:
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,但随后出现此错误:
I have already tried to change the url to ssh instead of https but then I got this error:
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上更改了密码,以确保它不违反严格的密码要求,并且不能解决此问题. 有人能帮忙吗?
I have already changed my password on GitHub to make sure that it does not violate the strong password requirements and this did not fix the issue. Anyone able to help?
推荐答案
确保使用HTTPS URL输入:
Make sure, with the HTTPS URL, to enter:
- 正确的用户名 josiah-brown
- 正确的密码(或令牌,如果您具有更新GitHub密码,因为您的
- the right username josiah-brown
- the right password (or token, if you have 2FA activated for your account). Make sure to update your GitHub password first, because your current one is too weak.
注意:我在您的GitHub页面个人资料中看不到任何存储库,因此也许Test1
是私人仓库.
如果没有,请首先在GitHub上创建它.
Note: I do not see any repository in your GitHub page profile, so maybe Test1
is a private repo.
If not, create it first on GitHub.
推送到GitHub时从未提示我输入密码.现在该存储库也已公开.
I was never prompted to enter the password when pushing to GitHub. Also the repository is now public.
典型的是:
- HTTP URL
- 已缓存凭据:使用
git config credential.helper
检查
- an HTTP URL
- with credentials cached: check with
git config credential.helper
如果缓存的密码太弱,则需要从缓存中删除.
If the password cached is too weak, you need to remove it from the cache.
然后,在下一次推送时,将要求您输入用户名/密码.
再次,请先更改您的密码(当前密码太弱).
Then, on the next push, you will be asked for your username/password.
Again, change your password first (the current one is too weak).
这篇关于无法将本地存储库推送到GitHub(返回错误403)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!