tomb
tomb

Reputation: 1436

Can't push to existing live heroku app on Cedar Stack

I successfully pushed a live app to heroku on cedar stack at livebytransit.com a few weeks ago, and I have successfully pushed code changes until recently. I have not been able to push code changes after creating a staging app from the same working directory...see afternoon-cloud-6227.herokuapp.com. My thought was to push changes first to afternoon-cloud, then if all looked good, push to the main site. As it stands right now, I can't push changes to either app.

Here is some code that shows some things I have tried. I think there are so many things wrong with this that my best bet is to probably create a new folder, clone the app from github, and redeploy to a new app on heroku and burn the two existing apps....but I have some users that would get blown away in the process so I would like to salvage what I have in my existing directory if possible.

TBones-MacBook-Pro:livebytransit PG$ git remote -v
afternoon-cloud-6227    [email protected]:afternoon-cloud-6227.herokuapp.git (fetch)
afternoon-cloud-6227    [email protected]:afternoon-cloud-6227.herokuapp.git (push)
heroku  [email protected]:livebytransit.herokuapp.git (fetch)
heroku  [email protected]:livebytransit.herokuapp.git (push)
orgin   [email protected]:tom-brown/LiveByTransit.git (fetch)
orgin   [email protected]: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: [email protected]:<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 [email protected]:livebytransit.herokuapp.git
TBones-MacBook-Pro:livebytransit PG$ git remote -v
heroku  [email protected]:livebytransit.herokuapp.git (fetch)
heroku  [email protected]:livebytransit.herokuapp.git (push)
livebytransit   [email protected]:livebytransit.herokuapp.git (fetch)
livebytransit   [email protected]:livebytransit.herokuapp.git (push)
orgin   [email protected]:tom-brown/LiveByTransit.git (fetch)
orgin   [email protected]: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: [email protected]:<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: [email protected]:<app>.git where <app> is your app's name.

fatal: The remote end hung up unexpectedly

TBones-MacBook-Pro:livebytransit PG$ git push heroku [email protected]:livebytransit.herokuapp.git

 !  Invalid path.
 !  Syntax is: [email protected]:<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

One thing that is really puzzling me is why origin is misspelled. It makes me wonder if I somehow changed this by accident? Any thoughts or advice would be very much appreciated.

Upvotes: 0

Views: 3194

Answers (2)

Jon Stokes
Jon Stokes

Reputation: 213

Neil's answer actually worked for me. I checked .git/config and found that somehow, there was an extra .git in there, as follows:

[remote "heroku"]
url = [email protected]:jon-demo-app.git.git
fetch = +refs/heads/*:refs/remotes/heroku/*

I changed jon-demo-app.git.git to jon-demo-app.git and was golden.

Upvotes: 0

Neil Middleton
Neil Middleton

Reputation: 22238

It sounds to me like your heroku remote is borked in .git/config.

Given that your application is living at livebytransit.herokuapp.com, your heroku remote should be:

[email protected]:livebytransit.git

If you're looking to have topic branches of the same application running in two seperate Heroku applications I recommend you read this:

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

Upvotes: 2

Related Questions