Can't push code to Bitbucket



I get this message when i do a push to Bitbucket -
Permission denied (publickey).
fatal: Could not read from remote repository.

I have my bitbucket connected to Cloud9.

Doing ls ~/.ssh shows i have my keys in place.

Doing git remote -v shows the correct origin.

Any ideas? Thanks.


Do i need to copy my from my c9 repo into my Bitbucket account? (i tried but it didn’t seem to work).

And btw after connecting my bitbucket, i see the repository i created in my C9 Bitbucket repository (which i don’t want to clone since it does not have anything, but i want to insert the content into it from my C9 repo)


Ok, got it working. I was adding the SSH keys to the wrong place :thinking:

Bitbucket has this horribly hidden place to add the SSH. When you login to Bitbucket, find the tiny weeny small icon at the bottom left which is your avatar, click on it and select the “Bitbucket Settings” options. Then select “SSH Keys”. Here add your keys from Cloud9, and you’ll be good to push.