git push heroku master permission denied on VISTA

◇◆丶佛笑我妖孽 提交于 2019-12-02 18:34:48
VonC

Note: your ticket on GitHub Support prompted the answer:

You need to give heroku your key. There should be a command to do it. If you can't find it, you'll have to contact their support.

For that, see Graeme Collins's answer (and also Heroku error: "Permission denied (public key)" ):

heroku keys:add ~/.ssh/id_rsa.pub

See Heroku devcenter for more on that process.
You can then see a list of all keys, including the key’s name, like this:

heroku keys

Note: that suppose you didn't use sudo to generate your keys, as " git clone heroku ssh permission denied " illustrates (where heroku keys:add doesn't work)


More information about your ssh keys in your other GitHub Support ticket.

debug1: Trying private key: /.ssh/identity
debug1: Trying private key: /.ssh/id_rsa
debug1: Trying private key: /.ssh/id_dsa

I'm not sure why it would be looking at /.ssh and not ~/.ssh then.
Try moving your keypair over to that path.


Shouldn't that be:

 git push origin master

? By default, a reference to the cloned repo is called 'origin', not 'heroku'

What does

git remote -v show

display?

It you want, you can reference the distant repo by the heroku name

git remote add heroku git@github.com:git_username/projectname.git

I had a similar problem. Running the following command fixed it for me:

heroku keys:add ~/.ssh/id_rsa.pub

Substitute "~/.ssh/id_rsa.pub" with your path to your id_rsa.pub file.

Mingming

The following line solved the problem for me.

heroku accounts:set youraccount

You can login first in heroku providing Enail and Password and can follow the following steps to add a local git repository into a heroku application instance.

  1. Issue this command at the Git Bash $ ssh-keygen -t rsa (default location and with empty passphrase. You can alternatives too).
  2. Again issue at the bash $ heroku keys:add (It will automatically add the public key from the default location).
  3. Issu this at the bash to check keys. $ heroku keys .
  4. You can add the remote for you app name $ heroku git:remote -a app_name
  5. Now you can push the git repo to the heroku using this command $ heroku push origin master
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!