I have recently installed the heroku toolbelt on a new windows machine. I have added ssh keys but when I run the following command:
heroku git clone -a app
I receive a permission denied error. There is no mention of it being an ssh error just permission denied.
Can you help me?
have you tried this?
heroku git:clone app_name local_path
Related
My c9.io site works very well but my heroku site gives "We're sorry, but something went wrong." after a few clicks. Is there a way to push my entire site to heroku instead of just changes? I'm hoping maybe that will fix it on the heroku side.
Thanks, Jon
Run these commands in the terminal.
git remote -v
git remote rm destination
after removing Heroku, add it again.
heroku create
git push heroku master
heroku run rake db:migrate
I recently started collaborating in a project on Heroku using Ruby on Rails. I was added as a collaborator and added the remote to my environment. After some development, I pushed some changes and had no problems:
$ git push staging
Where staging is the name of my remote.
Later, when trying to run "rake test" on Heroku, I recieved an error:
$heroku run rake test --app staging
Running `rake test` attached to terminal... failed
! You do not have access to the app staging.
Which is odd, as I was perfectly able to push my own changes. I checked the Heroku dashboard and saw that my push was logged there. I then tried to view the logs using the console, and the same problem occured.
$ heroku logs --app staging
! You do not have access to the app staging.
Finally, I tried to access the console, but it failed as well.
$ heroku run rails console --app staging
Running `rails console` attached to terminal... failed
! You do not have access to the app staging.
At this point I updated my Heroku toolbelt installation, and used "heroku auth" to verify that my email was showing up, but the error persists. I'm currently contacting Heroku support but I'm hoping someone with a similar issue could aid me in parallel.
Thanks!
So just in case anyone is having a similar problem, this occurs because I was mixing the name of my Heroku Apps with the name of my git remotes. So when I was calling --app staging (the name of my remote), I should have been using the actual name of the app, as found in Heroku.
Be sure to run heroku login before using Heroku toolbelt commands for the first time. It will not tell you that you have not signed in before.
This happen also when you haven't added heroku git remote repository.
You can add it with this command:
git remote add heroku https://git.heroku.com/<your project>.git
You can also type
heroku git:remote -a AppName
I had the same problem because I had created multiple remotes on heroku (e.g. a remote called "staging" for staging, and the default remote "heroku" for prod).
Solution
Use these two options to let heroku know which app and remote you're referring to:
-a your_app_name, and
--remote name_of_remote
Examples
For example, for the remote called staging:
heroku run env -a your_app_name --remote staging
or like this for the production remote:
heroku run env -a your_app_name --remote heroku
Extra Info
The above code runs the simple command env, but you can replace that with whatever commands you want to run on heroku.
Replace the name of the remote. By default, heroku creates one remote called heroku, which is typically the production remote. You can get your remotes with the command: git remote.
This was caused of your ssh key is no more permited to access. Make sure your ssh key is same. You can also regenarate your ssh key and add this to heroku.
You can also run:
heroku run rake test --remote staging
Not sure what happens under the hood, but locally the CLI tool figures out which app you mean based on your git remote.
I had the same problem in my case I was not pushing from master so I had to use this:
git push heroku :main
I had the same problem. It was cause I was not login in Heroku.
First I type:
heroku login
then i type:
heroku git:remote -a restserver-node-jngs
and it works.
I hope it be helpfull for someone.
Hi i am doing some coding with heroku and now i am running with some problem more specifically using this code in my terminal
sudo heroku addones:add sendgrid:starter --app project1
end result
Adding sendgrid:starter on project1... failed
! You do not have access to the app project1.
I am a bit new with ubuntu and ruby on rails so i dont have any god idea with this exept with ssh but my main problem is why and how any info or help would really be appreciated
Make sure you're logged into the account that owns/has permissions to project1 by running:
heroku login
Also, you have a syntax error in your command, should be:
heroku addons:add sendgrid:starter --app project1
I have been trying to push my first simple app to heroku for deployment. However, after ensuring the right gem files are installed (PG for Postgres), and having the proper login credentials on heroku and installing heroku on my Mac, it gives me the following message each time I attempt to upload it. How can I solve this issue so I can upload my code.
My-MacBook-Air:jrv JRV$ heroku login
Enter your Heroku credentials.
Email: ------k#gmail.com
Password (typing will be hidden):
Authentication successful.
My-MacBook-Air:jrv JRV$ git push heroku master
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
When i try the --verbose command i get the following:
Joses-MacBook-Air:jrv JRV$ git push heroku master --verbose
Pushing to git#heroku.com:tranquil-beyond-7774.git
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
When i try Heroku Keys and Keys:Add, I got the following response again
my-MacBook-Air:jrv JRV$ heroku keys
=== kwikteck#gmail.com Keys
ssh-rsa AAAAB3NzaC...+Q2oPy1mCf kwikteck#gmail.com#github.com
ssh-rsa AAAAB3NzaC...PTa++gCorp kwikteck#gmail.com#github.com
my-MacBook-Air:jrv JRV$ heroku keys:add
Found existing public key: /Users/JRV/.ssh/github_rsa.pub
Uploading SSH public key /Users/JRV/.ssh/github_rsa.pub... done
my-MacBook-Air:jrv JRV$ git push heroku master
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
my-MacBook-Air:jrv JRV$
I am currently running Rails 4.0.0, ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin10.8.0], with heroku-toolbelt/3.2.3 (x86_64-darwin10.8.0) ruby/1.9.3
It seems that you're not sending the right public key to Heroku to verify your identity.
You can try running git push heroku master with the --verbose option and see which publickey is really sent.
Try
heroku keys:add
in your app directory
Found the answer using the suggestions here and I did the following:
1) Went to https://devcenter.heroku.com/articles/keys
2) After using the heroku keys:add command to ensure the keys were uploaded and
3) getting no result, I deleted the keys in place using $ ssh-add -D
4) I created a new key using $ ssh-keygen -t rya ; it will ask for a password for the key for security
5) Added the keys back to Heroku using $ heroku keys:add
6) It will ask which key set you wish to you use, I choose the new key made by my system
7) After it accepted I checked using $ heroku keys
8) Then I was able to $ git push heroku master --verbose
System accepted the upload
I'm not sure what has happened to my heroku postgres but when I try to access it with command line with pg:info and pg:psql, I get "Not found".
I even clicked on the button on heroku to create a database for my app as well.
How do I debug this? What can I try? I don't mind starting from scratch since it's for testing.
It wants the psql installed and avalibale on the command line on your local machine. On Ubuntu, I ran sudo apt-get install postgresql-client . heroku pg:psql then worked straight away.
Try passing the appname or database name explicitly. The heroku cli tries to infer your application name from the 'heroku' git remote but if it can't find that it just returns the Not Found message.
eg;
heroku pg:info --app appname
If you are one OS X you should install postgres like this :
brew install postgres
See this. May be the same reason.
Heroku postgres not found