最佳答案
我刚启用了2FA (我想不出还有什么其他更改) ,git 询问我的用户名和密码。我两者都提供了,但他们“错了”。我在这里尝试了很多解决方案: Git push 需要用户名和密码,但是没有用。特别是,当从 https 切换到 ssh 时,ssh 键给出
拒绝(公开)许可。 无法从远程存储库读取。
$ git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
git config --global push.default simple
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
Username for 'https://github.com': **********
Password for 'https://mlbileschi@github.com':
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/mlbileschi/scala.git/'
有什么建议吗?