也许 Heroku git 远程地址以某种方式损坏。
您可以先尝试通过执行直接访问 Heroku host heroku.com
,ssh git@heroku.com -T
然后查看结果。像这样:尝试推送到 Heroku 时出错
你应该得到host heroku.com
类似的东西:
$ host heroku.com
heroku.com has address 50.19.85.132
heroku.com has address 50.19.85.154
heroku.com has address 50.19.85.156
heroku.com mail is handled by 10 aspmx2.googlemail.com.
heroku.com mail is handled by 10 aspmx3.googlemail.com.
heroku.com mail is handled by 10 aspmx4.googlemail.com.
heroku.com mail is handled by 10 aspmx5.googlemail.com.
heroku.com mail is handled by 10 alt1.aspmx.l.google.com.
heroku.com mail is handled by 10 alt2.aspmx.l.google.com.
heroku.com mail is handled by 10 aspmx.l.google.com.
然后尝试修复您的 .git/config 文件,使用:
git@heroku.com:your_app.git
像这样:无法推送到 Cedar Stack 上现有的 live heroku 应用程序
如果这两个没有帮助,那么可能会更复杂。