Fatal: Heroku repository does not exist - ruby-on-rails

I renamed my Heroku app from their goofy name to something more reasonable. I never imagined that it would cause me trouble here. just now I tried the following
git remote -v
heroku http://appname.herokuapp.com (fetch)
heroku http://appname.herokuapp.com (push)
origin git#github.com:MyAccount/games.git (fetch)
origin git#github.com:MyAccount/games.git (push)
I thought I had it won there. but then I tried
git push heroku master
and then i got this message
fatal: repository 'http://appname.herokuapp.com/' not found
I don't understand why it won't push

You need to change your heroku remote to match the new name for your app.
Do on the command line
git remote remove heroku
git remote add heroku git#heroku.com:YOUR_APP_NAME.git
Let me know if that doesn't fix it

Related

How to resolve this github/heroku conflict

I have an app on Heroku that I have had for a couple of years, but now I need to refactor some code and update some gems.
When I first started the app I was on a totally different machine. So I had to clone the github repo for that app.
Now I want to push the first changes but I get this error:
set git remote heroku to https://git.heroku.com/alfa-blog.git
I thought it was asking me to do something like this:
git remote add heroku https://git.heroku.com/alfa-blog.git
But I get this error:
fatal: remote heroku already exists.
How do I resolve this? If there is anything unclear, please let me know so I may clarify.
Do I delete the origin one?
heroku https://git.heroku.com/alfa-blog.git (fetch)
heroku https://git.heroku.com/alfa-blog.git (push)
origin https://github.com/<github-page>/Alpha_Blog.git (fetch)
origin https://github.com/<github-page>/Alpha_Blog.git (push)
Trying to rename remote repo:
$ git remote rename https://git.heroku.com/alfa-blog.git https://github.com/ldco2016/Alpha_Blog.git
fatal: No such remote: https://git.heroku.com/alfa-blog.git
You don't need to remove or rename anything, just set-url to the repo you are currently working in, like this:
git remote set-url origin https://github.com/<github-page>Alpha_Blog.git
Then you should be able to push your new changes to your existing app on Heroku.
Is the remote set to a different url right now? You could try removing it and then adding as you tried again.

I can't choose in which heroku remote push my app

I add a heroku app called 'myapp-production'. I could push in this remote via git push heroku master. Fine.
I created a second app on heroku called 'myapp-staging', and add this remote via git remote add myapp-staging git#heroku.com:myapp-staging.git.
git push heroku master seems to correspond to myapp-production.
And when I try to git push myapp-staging, I have this error :
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
How can I fix it and ideally be able to git push myapp-staging master and git push myapp-production master ?
git remote -v gives :
myapp-staging git#heroku.com:myapp-staging.git (fetch)
myapp-staging git#heroku.com:myapp-staging.git (push)
heroku https://git.heroku.com/myapp-production.git (fetch)
heroku https://git.heroku.com/myapp-production.git (push)
origin git#github.com:johndoe/myapp.git (fetch)
origin git#github.com:johndoe/myapp.git (push)
Thank's in advance for your help.
Make sure your ssh public key typically ~/.ssh/id_rsa.pub is registered with heroku. You can check that at https://dashboard.heroku.com/account

fatal: 'git_url' does not appear to be a git repository

When i run
G:\blogx>heroku create
DL is deprecated, please use Fiddle
Creating name... done, stack is stack
web_url | git_url
on running
G:\blogx>git push heroku master
fatal: 'git_url' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
on running
G:\blogx>git remote -v
heroku git_url (fetch)
heroku git_url (push)
I am not sure why this error is being generated...
Heroku wants you to deploy from Git, but you haven't got a valid URL to a git repository in your setup. Somehow, you've ended up with something called git_url instead of an actual path to git.
The easiest way to fix this is to run git remote rm heroku to remove the broken one, find your application's name in the Heroku control panel, then run heroku git:remote -a your-app-name-here.
The Heroku guide to deploying from Git and the Heroku getting started guides is a useful reference.

Can't push on heroku

I’ve just cloned one of my repositories on github, I've made some changes and I would like to send it on the heroku application. But when I try to run git push heroku master, I get :
fatal: 'heroku' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
What can I do to solve it?
This is because there's no remote named heroku. You can see your remotes by typing git remote -v. For my 'example' app I see the following:
$ git remote -v
heroku git#heroku.com:example.git (fetch)
heroku git#heroku.com:example.git (push)
If it's missing, you can add the remote with the following command:
git remote add heroku git#heroku.com:example.git
where example is the name of your heroku app.
Before you can do
$ git push heroku master
you need to setup heroku by following the steps given at Getting Started with Heroku. Once you have setup heroku, logged in,created your app.
Verify that git remote is added
$ git remote -v
it should list a remote named heroku. if it does then the error heroku' does not appear to be a git repository will go away
If you have followed the steps in tutorial you just need to login in again:
cmd "heroke login"

How do I change the fetch and push actions targets for deploying heroku apps

Right now when I type git remote -v in the terminal when I am in my applications directory I get:
heroku git#heroku.com:falling-samurai-3043.git (fetch)
heroku git#heroku.com:falling-samurai-3043.git (push)
origin git#github.com:obsideous/sample_app.git (fetch)
origin git#github.com:obsideous/sample_app.git (push)
falling-smurai-3043 no longer exists because I destroyed it from my account on the heroku website. I would like it to look like:
heroku git#heroku.com:(one that I create).git (fetch)
heroku git#heroku.com:(one that I create).git (push)
origin git#github.com:BigBoy1337/sample_app.git (fetch)
origin git#github.com:BigBoy1337/sample_app.git (push)
obsideous is my old account and BigBoy1337 is my new GitHub account that I am trying to switch everything over to.
How can I accomplish these changes. I am a noob at this stuff so the more detailed the better. Thanks!
You can change the remote name by typing (git remote man page):
git remote set-url heroku git#heroku.com:(one that I create).git
git remote set-url origin git#github.com:BigBoy1337/sample_app.git
That will update both push and fetch addresses in your git config file.

Resources