【问题标题】:Cant push to Heroku from different machine无法从不同的机器推送到 Heroku
【发布时间】:2019-04-18 19:26:44
【问题描述】:

我将存储库从 Heroku 仪表板设置中提到的 URL 克隆到 Windows 机器。提交更改后,尝试推送到 Heroku 失败。

=> git push heroku master

fatal: 'heroku' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我遵循了一些指令from here,现在我得到了

=> git push heroku master

The authenticity of host 'heroku.com (50.19.85.156)' can't be established.
RSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxx/o.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'heroku.com,xx.xx.xx.xx' (RSA) to the list of known hosts.
git@heroku.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

【问题讨论】:

    标签: ruby-on-rails git heroku ruby-on-rails-5 heroku-cli


    【解决方案1】:

    Heroku git 使用带有heroku keys:add 的公钥对您进行身份验证。您必须为您正在使用的每台机器拥有一个单独的私有/公共 SSH 密钥对。

    使用heroku keys:add添加新密钥

    然后验证它是否适用于ssh -v git@heroku.com

    https://devcenter.heroku.com/articles/keys#adding-keys-to-heroku

    【讨论】:

      猜你喜欢
      • 2017-12-16
      • 1970-01-01
      • 2016-12-14
      • 1970-01-01
      相关资源
      最近更新 更多