使用 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客户端,开始报上述错误。已尝试使用提示中文档的方法,无果。
关于 LearnKu
您无法使用Heroku用户名(电子邮件)和密码使用Heroku HTTP Git端点进行身份验证。使用本节中描述的API密钥。
如果您正在使用其他Git客户端,如EGit或Tower,则将它们配置为使用空字符串作为用户名(或任何您喜欢的字符串——它被忽略)和帐户API密钥作为密码。API密钥在CLI和仪表板中可用。
参考 https://devcenter.heroku.com/articles/auth...
去查看使用heroku的秘钥
@sunnylin 没有看懂翻译,能否给出具体解决方案,我一直使用的Git 客户端
这个问题我也没有遇到过,不过我看翻译的意思的让你用空用户名和heroku的API token来登录heroku。通过heroku的认证后才能上传至heroku。$ heroku auth:token 通过这个命令可以获取heroku上的Api token
参考一下https://cloud.tencent.com/developer/ask/81956/answer/142781
@sunnylin 谢谢。我试过使用空用户名登陆,但一直提示让我输入Email,无法跳过。然后我尝试修改.netrc文件中的api.heroku.com 中的用户名和密码,保存后依旧是报原来的错误。
用blank试一试
远程:!警告:
远程:!不要使用git使用用户名和密码进行身份验证。
远程:!运行 heroku 登录以更新您的凭据,然后重试git命令。
远程:!有关详细信息,请参阅文档:https://devcenter.heroku.com/articles/git#http-git-authentication
致命:“https://git.heroku.com/secret-fortress-450...” 身份验证失败