2013-08-28 43 views
1

我是新手到的Heroku。我試圖通過以下步驟將一個Django應用程序部署到heroku。無法應用程序部署到Heroku的

  1. 安裝vartualenv
  2. 經由PIP
  3. 安裝Heroku的工具區
  4. 安裝的Django gunicron創建一個空的git
  5. GIT中添加。
  6. git的承諾-m 「第一承諾」
  7. SSH-凱基
  8. 的Heroku創建
  9. Heroku的鍵:添加
  10. 混帳推Heroku的主

而一個錯誤

(venv)[email protected]:~/Desktop/projects/ossko$ heroku keys:add 
Found existing public key: /home/han/.ssh/id_rsa.pub 
Uploading SSH public key /home/han/.ssh/id_rsa.pub... done 
(venv)[email protected]:~/Desktop/projects/ossko$ git push heroku master 
ssh: connect to host heroku.com port 22: Connection timed out 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

我必須遵循的Heroku幫助網站每個步驟。

請幫我解決這個錯誤

我有Ubuntu的13.4 64位操作系統

更新:這裏是git remote -v結果:

$ git的遠程-v
的Heroku [email protected]:infinite-mesa-xxx.git(fetch)
heroku [email protected]:infinite-mesa-xxx.git(推送)

+0

您是否可能在阻止端口22的防火牆之後? – culix

+0

我不知道,如何檢查? 那麼我可以推槽的github ... – ddiipp

回答

0

好吧,我剛剛解決了這個問題,這個問題是與添加ssh密鑰。 所以對於Heroku的部署正確的命令是

[email protected]:~$ heroku login 
Enter your Heroku credentials. 
Email: [email protected] 
Password (typing will be hidden): 
Authentication successful. 
[email protected]:~$ cd dev/flask-app 
[email protected]:~/dev/flask-app$ heroku keys:clear 
Removing all SSH keys... done 
[email protected]:~/dev/flask-app$ heroku keys:add 
Found existing public key: /home/nihan/.ssh/id_rsa.pub 
Uploading SSH public key /home/nihan/.ssh/id_rsa.pub... done 
[email protected]:~/dev/flask-app$ ssh-add ~/.ssh/id_rsa <---- This was the missing key 
Enter passphrase for /home/nihan/.ssh/id_rsa: 
Identity added: /home/nihan/.ssh/id_rsa (/home/nihan/.ssh/id_rsa) 
[email protected]:~/dev/flask-app$ git push heroku master 

因爲我的SSH從來不知道哪個鍵使用它無論如何都Heroku的錯誤信息,這就是爲什麼Heroku的被否認。

0

嘗試運行git remote -v。它會給你多個遙控器嗎?

your_app_name [email protected]:your_app_name.git(取)
your_app_name [email protected]:your_app_name.git(推)

如果遠程倉庫命名爲其它的東西比「 heroku「,您需要指定推送到該網站。例如,如果你的遙控器被命名爲ossko,嘗試像

混帳推ossko主

通常你會爲遠程倉庫不同的名字,如果你有一個以上的Heroku應用程序 - 您可以使用每個應用的名稱不同。

+0

(VENV)韓@鞋跟:〜/桌面/項目/ ossko $ git的遠程-v 的Heroku \t [email protected]:無限臺地xxx.git(取) heroku \t [email protected]:infinite-mesa-xxx.git(推送) 這是git remote -v的結果 – ddiipp