2013-05-17 101 views
1

我剛剛克隆我在github庫之一,我已經做了一些改變,我想給它Heroku的應用。但是,當我嘗試運行git push heroku master,我得到:不能推在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. 

我能做些什麼來解決呢?

+0

你有沒有重新推到Github上?同時運行'git remote -v'確保你推向右邊的Heroku repo – Anconia

+0

是的,我已經推到github。和遠程-v給我: 來源myaccount/vitrine.git(取) 來源https://github.com/grosalex/vitrine.git(推) – user1796260

+0

請看我更新的回答 – Anconia

回答

2

這是因爲沒有遠程命名的heroku。您可以通過輸入git remote -v來查看您的遙控器。對於我的「示例」應用程序,我看到以下內容:

$ git remote -v 
heroku [email protected]:example.git (fetch) 
heroku [email protected]:example.git (push) 

如果它丟失,您可以用下面的命令來遠程添加:

git remote add heroku [email protected]:example.git 

其中example是您的Heroku應用程序的名稱。

+0

它的工作非常感謝 – user1796260

1

之前,你可以做

$ git push heroku master 

您按照在Getting Started with Heroku給出的步驟需要設置的Heroku。一旦你設置好heroku,登錄,創建你的應用程序。

驗證遠程Git添加

$ git remote -v 

應列出遠程命名heroku。如果確實如此,則錯誤heroku' does not appear to be a git repository將消失

0

如果您已按照教程中的步驟,你只需要重新登錄在:

cmd "heroke login"