使用 Git push Heroku master 推送 出现认证问题

具体代码如下:

$ git push heroku master

remote: !       WARNING:

remote: !       Do not authenticate with username and password using git.

remote: !       Run heroku login to update your credentials, then retry the git command.

remote: !       See documentation for details: https://devcenter.heroku.com/articles/git#...

fatal: Authentication failed for 'https://git.heroku.com/secret-fortress-450...'

之前一直正常,后来升级了Git客户端,开始报上述错误。已尝试使用提示中文档的方法,无果。

《L01 基础入门》
我们将带你从零开发一个项目并部署到线上,本课程教授 Web 开发中专业、实用的技能,如 Git 工作流、Laravel Mix 前端工作流等。
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
讨论数量: 6

file
您无法使用Heroku用户名(电子邮件)和密码使用Heroku HTTP Git端点进行身份验证。使用本节中描述的API密钥。

file
如果您正在使用其他Git客户端,如EGit或Tower,则将它们配置为使用空字符串作为用户名(或任何您喜欢的字符串——它被忽略)和帐户API密钥作为密码。API密钥在CLI和仪表板中可用。
参考 https://devcenter.heroku.com/articles/auth...
去查看使用heroku的秘钥

5年前 评论

@sunnylin 没有看懂翻译,能否给出具体解决方案,我一直使用的Git 客户端

5年前 评论

这个问题我也没有遇到过,不过我看翻译的意思的让你用空用户名和heroku的API token来登录heroku。通过heroku的认证后才能上传至heroku。$ heroku auth:token 通过这个命令可以获取heroku上的Api token
参考一下https://cloud.tencent.com/developer/ask/81956/answer/142781

5年前 评论

@sunnylin 谢谢。我试过使用空用户名登陆,但一直提示让我输入Email,无法跳过。然后我尝试修改.netrc文件中的api.heroku.com 中的用户名和密码,保存后依旧是报原来的错误。

5年前 评论

远程:!警告:

远程:!不要使用git使用用户名和密码进行身份验证。

远程:!运行 heroku 登录以更新您的凭据,然后重试git命令。

远程:!有关详细信息,请参阅文档:https://devcenter.heroku.com/articles/git#http-git-authentication

致命:“https://git.heroku.com/secret-fortress-450...” 身份验证失败

5年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!