Heroku with Multiple Domains - ruby-on-rails

I have multiple heroku domains. After I created a new one, and I pushed, it checked the rsa for the first one.
How to handle this? Thanks.
203-96:first_app marklaudalauw$ heroku create
Creating serene-chamber-4301... done, stack is cedar
http://serene-chamber-4301.herokuapp.com/ | git#heroku.com:serene-chamber-4301.git
203-96:first_app marklaudalauw$ git push heroku master
! Your key with fingerprint 98:6b:fe:d4:e3:0a:17:16:ab:f8:11:18:a2:66:76:b6 is not authorized to access glacial-shelf-8147.
fatal: The remote end hung up unexpectedly

Before pushing Try this:-
$ git remote add heroku git#heroku.com:yourappname.git ( to add current stack )
$ heroku keys:add ~/.ssh/id_rsa.pub (if stuck with key then add local machine key to heroku)
$ git commit -m "message"
$ git push heroku master <branch name>

I managed to solve it by the following commands:
git remote rm heroku
git remote add heroku git#heroku.com:serene-chamber-4301.git
Thanks...

Related

Can run rake but not push to heroku

I have a remote on heroku called staging. I can
heroku run rake db:version --remote staging
but if I try git push staging master
I receive the error message:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
However I can push to github e.g. git push origin master
What is the easiest way to fix this?
You will have to add your system public key to heroku ssh keys. You can copy .ssh/id_rsa.pub content and paste while adding ssh keys from Manage account > SSH keys > Edit.

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.

Git push heroku master error?

I have successfully created using heroku create but when i push from git it gives me error as below:-
C:\Sites\boot>git push heroku master
! Your account snehp92#gmail.com does not have access to protected-thicket-253
8.
!
! SSH Key Fingerprint: 6e:d8:39:da:45:ad:b5:b2:e5:36:2e:14:0e:92:b5:8e
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
You need to add your ssh key to heroku. To add your keys run the following command
heroku keys:add
If you don't have a key then generate a new key with
ssh-keygen -t rsa
and then add the ssh key to heroku
I would recommend getting the latest version of Heroku Toolbelt, and then adding the repository again:
$ heroku login
Enter your Heroku credentials.
Email: adam#example.com
Password:
Could not find an existing public key.
Would you like to generate one? [Yn]
Generating new SSH public key.
Uploading ssh public key /Users/adam/.ssh/id_rsa.pub
git remote -v
git remove heroku master
heroku git:remote -a protected-thicket-253

Error while deploying application in heroku

I am getting below error while creating app and deploying in heroku using below command
sudo git push heroku master
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I tried all the possible scenarios
creating new ssh key , giving admin rights to folder, deleting git remote for heroku and adding it again etc
Steps followed by me:
1) git init
2) git add .
3) git commit -m "Initial Commit"
4) heroku login
5) heroku create
6) sudo git push heroku master
Usually when we create new heroku project using "heroku create" it will create new project and that heroku URL is set as heroku GIT remote URL, but that also not happening everytime i am doing it manually. May be this also due to that same issue i guess...
Below is my detailed error
ponvino#ponvino-desktop:~/RubyWorkspace/prod/theScholarsPage$ sudo mv ~/.ssh/ /.ssh_backup
ponvino#ponvino-desktop:~/RubyWorkspace/prod/theScholarsPage$ heroku keys:add
Could not find an existing public key.
Would you like to generate one? [Yn] y
Generating new SSH public key.
Uploading SSH public key /home/ponvino/.ssh/id_rsa.pub... done
ponvino#ponvino-desktop:~/RubyWorkspace/prod/theScholarsPage$ git push heroku master
The authenticity of host 'heroku.com (50.19.85.156)' can't be established.
RSA key fingerprint is 8b:48:5e:67:0e:c9:16:47:32:f2:87:0c:1f:c8:60:ad.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'heroku.com,50.19.85.156' (RSA) to the list of known hosts.
Agent admitted failure to sign using the key.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Please help me
Thanks in Advance,
Check that your ssh key is loaded:
ssh-add -l
If not:
ssh-add ~/.ssh/your_private_key
Try again to push to heroku
You should generate pair of keys and add your public key to your heroku account.
More info: https://devcenter.heroku.com/articles/keys
ssh-keygen -t rsa
and then:
heroku keys:add
should be enough.
If nothing works even after trying the above solutions. do this
$ mv ~/.ssh/ ~/.ssh_backup
$ heroku keys:add
$ git push heroku master
Almost same problem was asked and answered in the link below.
Try it

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"

Resources