首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >未能将应用程序部署到heroku

未能将应用程序部署到heroku
EN

Stack Overflow用户
提问于 2013-08-28 13:34:22
回答 2查看 1.6K关注 0票数 1

我是heroku的新手。我试图通过以下步骤将Django应用程序部署到heroku。

  1. 安装的vartualenv
  2. 通过pip安装Django gunicron
  3. 已安装heroku皮带
  4. 创建了一个空的git
  5. 吉特加。
  6. git提交-m“首次提交”
  7. 宋承根
  8. heroku创造
  9. heroku键:添加
  10. git推heroku大师

还有一个错误

代码语言:javascript
运行
复制
(venv)han@HEEL:~/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)han@HEEL:~/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 git@heroku.com:无穷-Mesa-xxx.git(获取) heroku git@heroku.com:无限-Mesa-xxx.git(推)

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2013-10-01 06:26:38

好的,我刚刚解决了这个问题,这个问题就是添加ssh键。因此,heroku部署的正确命令是

代码语言:javascript
运行
复制
nihan@heel:~$ heroku login
Enter your Heroku credentials.
Email: debashis.dip@gmail.com
Password (typing will be hidden): 
Authentication successful.
nihan@heel:~$ cd dev/flask-app
nihan@heel:~/dev/flask-app$ heroku keys:clear
Removing all SSH keys... done
nihan@heel:~/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
nihan@heel:~/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)
nihan@heel:~/dev/flask-app$ git push heroku master

因为我的ssh从来不知道该使用哪个键,不知何故,heroku得到了错误的信息,这就是heroku否认的原因。

票数 0
EN

Stack Overflow用户

发布于 2013-08-28 13:53:55

尝试运行git remote -v。会不会给你一个以上的遥控器,像这样?

your_app_name git@heroku.com:your_app_name.git (提取) your_app_name git@heroku.com:your_app_name.git (push)

如果远程仓库的名称不是“heroku”,则需要指定对该站点的推送。例如,如果您的遥控器名为ossko,请尝试如下

git推ossko大师

通常,如果您有多个heroku应用程序--您可以为每个应用程序使用不同的名称,则远程仓库的名称通常会不同。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18489472

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档