![](/img/trans.png)
[英]Pushing to Heroku failed after adding new gems for postgresql and installing bundle
[英]Error pushing to Heroku after adding new domain
我最近在我的rails應用程序中添加了一個新的GoDaddy域。 當我推送到git時一切正常,但是當我嘗試使用以下方式推送到Heroku時:
$ git push heroku
我收到以下錯誤:
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.
是否因為需要創建另一個環境而發生此問題? 我的GoDaddy網站的域名列在“ $ heroku域名”下,但似乎沒有連接。
任何想法都會有所幫助。 TIA!
這個問題可能與哥達無關。 嘗試輸入
git remote -v
這將為您提供已設置的遠程存儲庫的列表。 如果沒有人在heroku上指向您的應用程序,則需要進行設置。
在heroku開發中心的文章中參考此內容
https://devcenter.heroku.com/articles/git
編輯
由於我懷疑您的heroku遙控器被命名為“ prod”,而不是“ heroku”,因此請嘗試嘗試“ git push prod”。
您可能必須指定分支,在這種情況下,命令將是“ git push prod master”
編輯2
看來您尚未被授權推送到heroku。 根本問題可能有所不同。 我建議從本文開始:
https://devcenter.heroku.com/articles/keys
另請參閱此SO文章
至於您對以下答案的評論,很明顯您應該嘗試
git push prod master
而不是git push heroku
“ heroku”和“ prod”只是遠程存儲庫的名稱。 默認情況下,Heroku創建名為“ heroku”的存儲庫。 據我所知,它可以根據您的需要進行更改
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.