【问题标题】:How to resolve unable to push to GitHub due to "Invalid username or password"?如何解决由于“无效的用户名或密码”而无法推送到 GitHub?
【发布时间】:2017-06-29 01:04:23
【问题描述】:

我遇到这个问题已经有一段时间了。基本上,我无法使用带有 https 的 GitBash 从我的工作计算机推送到 GitHub 上的个人仓库。

这是错误信息

$ git push origin master
Username for 'https://github.com': 
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/georgeliu1998/mlnd.git/'

检查了以下这些线程,但它们似乎不是相同的情况。

【问题讨论】:

    标签: git github


    【解决方案1】:

    事实证明,我需要使用我的用户名登录,但我应该使用可以创建的个人访问令牌here,而不是使用普通的 GitHub 帐户密码。

    Do Nhu Vy 编辑的内容:

    因为我使用了名为“双因素身份验证”的 GitHub 功能(它不是标准的 Git 功能,它是 GitHub.com 添加的功能)。打开该功能后,我必须创建“个人访问令牌”

    参考

    https://help.github.com/articles/about-two-factor-authentication/

    https://github.com/settings/tokens

    【讨论】:

    猜你喜欢
    • 2015-05-31
    • 2021-05-31
    • 1970-01-01
    • 1970-01-01
    • 2016-08-22
    • 2013-01-23
    • 1970-01-01
    • 2018-11-10
    相关资源
    最近更新 更多