首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法推送到Cedar Stack上的现有实时heroku应用程序

无法推送到Cedar Stack上的现有实时heroku应用程序
EN

Stack Overflow用户
提问于 2012-01-09 06:47:37
回答 2查看 3.2K关注 0票数 0

几周前,我在livebytransit.com的雪松堆栈上成功地向heroku推送了一个实时应用程序,直到最近,我还成功地推送了代码更改。在从相同的工作云下午- directory...see -6227.herokuapp.com创建了一个临时应用程序后,我无法推送代码更改。我的想法是首先将更改推送到下午云,然后如果一切看起来都很好,则推送到主站点。就目前而言,我不能将更改推送到这两个应用程序中。

下面是一些代码,显示了我尝试过的一些东西。我认为这里面有太多的错误,所以我最好的办法是创建一个新的文件夹,从github克隆应用程序,然后重新部署到heroku上的一个新应用程序,并烧毁两个现有的apps....but,我有一些用户会在这个过程中被吹走,所以如果可能的话,我想抢救我现有目录中的东西。

代码语言:javascript
复制
TBones-MacBook-Pro:livebytransit PG$ git remote -v
afternoon-cloud-6227    git@heroku.com:afternoon-cloud-6227.herokuapp.git (fetch)
afternoon-cloud-6227    git@heroku.com:afternoon-cloud-6227.herokuapp.git (push)
heroku  git@heroku.com:livebytransit.herokuapp.git (fetch)
heroku  git@heroku.com:livebytransit.herokuapp.git (push)
orgin   git@github.com:tom-brown/LiveByTransit.git (fetch)
orgin   git@github.com:tom-brown/LiveByTransit.git (push)

TBones-MacBook-Pro:livebytransit PG$ git add .
TBones-MacBook-Pro:livebytransit PG$ git commit -am"lots of changes that have been pushed to github already via git push orgin master"
# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#   (commit or discard the untracked or modified content in submodules)
#
#   modified:   voting (modified content)
#
no changes added to commit (use "git add" and/or "git commit -a")

TBones-MacBook-Pro:livebytransit PG$ git push afternoon-cloud-6227

 !  Invalid path.
 !  Syntax is: git@heroku.com:<app>.git where <app> is your app's name.

fatal: The remote end hung up unexpectedly

TBones-MacBook-Pro:livebytransit PG$ git push orgin master
Everything up-to-date

TBones-MacBook-Pro:livebytransit PG$ git remote rm afternoon-cloud-6227
TBones-MacBook-Pro:livebytransit PG$ git remote add livebytransit git@heroku.com:livebytransit.herokuapp.git
TBones-MacBook-Pro:livebytransit PG$ git remote -v
heroku  git@heroku.com:livebytransit.herokuapp.git (fetch)
heroku  git@heroku.com:livebytransit.herokuapp.git (push)
livebytransit   git@heroku.com:livebytransit.herokuapp.git (fetch)
livebytransit   git@heroku.com:livebytransit.herokuapp.git (push)
orgin   git@github.com:tom-brown/LiveByTransit.git (fetch)
orgin   git@github.com:tom-brown/LiveByTransit.git (push)

TBones-MacBook-Pro:livebytransit PG$ git add .
TBones-MacBook-Pro:livebytransit PG$ git commit -a -m "lots of changes already commited to github via git push orgin master"
# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#   (commit or discard the untracked or modified content in submodules)
#
#   modified:   voting (modified content)
#
no changes added to commit (use "git add" and/or "git commit -a")

TBones-MacBook-Pro:livebytransit PG$ git push orgin master
Everything up-to-date

TBones-MacBook-Pro:livebytransit PG$ git push heroku master

 !  Invalid path.
 !  Syntax is: git@heroku.com:<app>.git where <app> is your app's name.

fatal: The remote end hung up unexpectedly

TBones-MacBook-Pro:livebytransit PG$ git push heroku livebytransit

 !  Invalid path.
 !  Syntax is: git@heroku.com:<app>.git where <app> is your app's name.

fatal: The remote end hung up unexpectedly

TBones-MacBook-Pro:livebytransit PG$ git push heroku git@heroku.com:livebytransit.herokuapp.git

 !  Invalid path.
 !  Syntax is: git@heroku.com:<app>.git where <app> is your app's name.

fatal: The remote end hung up unexpectedly

TBones-MacBook-Pro:livebytransit PG$ git push heroku:livebytransit.herokuapp.git
ssh: Could not resolve hostname heroku: nodename nor servname provided, or not known
fatal: The remote end hung up unexpectedly

有一件事真的让我很困惑,那就是为什么origin被拼错了。这让我怀疑我是不是不小心改变了这一点?任何想法或建议都将不胜感激。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2012-01-09 07:27:17

在我看来,你的heroku遥控器是在.git/config中使用的。

鉴于您的应用程序位于livebytransit.herokuapp.com,您的heroku遥控器应该是:

代码语言:javascript
复制
git@heroku.com:livebytransit.git

如果您希望在两个独立的Heroku应用程序中运行同一应用程序的主题分支,我建议您阅读以下内容:

http://neilmiddleton.com/deploying-topic-branches-to-heroku/

票数 2
EN

Stack Overflow用户

发布于 2012-01-27 07:45:53

尼尔的回答实际上对我很有效。我检查了.git/config,发现其中有一个额外的.git,如下所示:

代码语言:javascript
复制
[remote "heroku"]
url = git@heroku.com:jon-demo-app.git.git
fetch = +refs/heads/*:refs/remotes/heroku/*

我将jon-demo-app.git.git更改为jon-demo-app.git,并且是金色的。

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

https://stackoverflow.com/questions/8782079

复制
相关文章

相似问题

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