我已經有git設置併成功推送到Heroku大約6個月(在Mac上使用Github應用程序的mac)。Heroku權限被拒絕/無法連接到heroku api
昨天突然我再也不能推動變化的Heroku,我得到這個錯誤信息:
$ git push heroku master
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
環視了一下,似乎這可能是我的關鍵問題之後。 我創建了一個新的密鑰,並把它添加到的Heroku這似乎工作:
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/kat/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/kat/.ssh/id_rsa.
Your public key has been saved in /Users/kat/.ssh/id_rsa.pub.
$ heroku keys:add
Found existing public key: /Users/kat/.ssh/github_rsa.pub
Uploading SSH public key /Users/kat/.ssh/github_rsa.pub... done
但現在我得到一個不同的錯誤,當我嘗試推到Heroku的:
$ git push heroku master
fatal: 'heroku' does not appear to be a git repository
fatal: Could not read from remote repository.
任何建議將是非常感謝,謝謝
運行:git remote heroku show。它打印出什麼?它是否丟失?添加它:git remote add heroku <你的git repo>。然後再試一次。 – DiegoSalazar