使用 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 客户端,开始报上述错误。已尝试使用提示中文档的方法,无果。

《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《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 的秘钥

6年前 评论

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

6年前 评论

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

6年前 评论

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

6年前 评论

远程:!警告:

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

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

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

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

6年前 评论