从github克隆的项目。 heroku不起作用 [英] cloned project from github. heroku does not work

查看:496
本文介绍了从github克隆的项目。 heroku不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从github克隆了一个项目到我的桌面。我曾经在笔记本电脑上工作过。



然而,在笔记本电脑上,尽管我已经安装了它,但heroku似乎不适用于此应用程序。

第一个问题:

  heroku open 
>未指定应用程序。
>从app文件夹运行此命令,或者将它设置为--app< app name>

我不必指定 - app heroku create



第二步Probelm:

  git push heroku master 

给出错误

 致命的:'heroku'似乎不是一个混帐存储库
致命的:远程端意外挂起

heroku list





 !这个版本的heroku宝石已被弃用。 
!请通过运行更新它:gem update heroku


解决方案

  git remote add heroku git@heroku.com:{my-project-name} .git 
code>

在您替换 {my-project-name} 时, Heroku应用程序出现在您的Heroku帐户中。例如,如果您的Heroku帐户显示您有一个名为 flows-water-397 的应用程序,则该行应为:

  git remote add heroku git@heroku.com:flowing-water-397.git 

然后Git和Heroku gem会知道这个Git仓库连接到一个Heroku.com应用程序。然后你可以做如下事情:

  git push heroku master 
heroku open

最后,了解更多有关 Git Remotes


I cloned a project from github over to my desktop. I used to work on it form my laptop.

However, on laptop heroku does not seem to work for this app eventhough i have it installed.

First problem:

heroku open
>No app specified.
>Run this command from app folder or set it adding --app <app name>

I did not have to specify the --app on my laptop. Because I guess I did command heroku create initially on the lapop.

Second Probelm:

git push heroku master

gives errors

fatal: 'heroku' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

and heroku list

says

 !   This version of the heroku gem has been deprecated.
 !   Please update it by running: gem update heroku

解决方案

First do:

git remote add heroku git@heroku.com:{my-project-name}.git

Where you replace {my-project-name} with the name of the Heroku application as it appears in your Heroku account. For example, if your Heroku account says you have an application named flowing-water-397, then the line would be:

git remote add heroku git@heroku.com:flowing-water-397.git

Then Git and the Heroku gem will know that this Git repo is connected to a Heroku.com application. Then you can do things such as:

git push heroku master
heroku open

Finally, learn a little bit more about Git Remotes.

这篇关于从github克隆的项目。 heroku不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆