[英]Can't push on heroku
我剛剛在github上克隆了我的一個存儲庫,我做了一些更改,我想在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.
我該怎么做才能解決它?
這是因為沒有名為heroku的遙控器。 您可以通過輸入git remote -v
來查看您的遙控器。 對於我的“示例”應用程序,我看到以下內容:
$ git remote -v
heroku git@heroku.com:example.git (fetch)
heroku git@heroku.com:example.git (push)
如果缺少,則可以使用以下命令添加遠程:
git remote add heroku git@heroku.com:example.git
其中示例是您的heroku應用程序的名稱。
在你能做之前
$ git push heroku master
你需要按照Heroku入門中給出的步驟設置heroku。 一旦你設置了heroku,登錄,創建你的應用程序。
驗證是否添加了git remote
$ git remote -v
它應該列出一個名為heroku
的遙控器。 如果它確實那么錯誤heroku' does not appear to be a git repository
將會消失
如果您已按照教程中的步驟操作,則只需再次登錄:
cmd "heroke login"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.