1

I have my repo online at bitbucket, I have created the ssh key using:

ssh-keygen

And I've used the resulted key as a deployment key for the online repo. Then, at source-tree I have added the generated key, but when I push the repo, I get this error:

Pushing to git@bitbucket.org:xxxxx/xxxxxx.git

Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.




Completed with errors, see above.

So, what is still missing?

BJ Myers
  • 6,617
  • 6
  • 34
  • 50
simo
  • 23,342
  • 38
  • 121
  • 218

1 Answers1

0

As mentioned in this answer, setting a "deployment key" would give you read-only access only: a push would never work.

You need to add your public key ($HOME/.ssh/id_rsa) to your BitBucket account.
See "How to install a public key on your Bitbucket account"

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I although I've created a specific public key, only the key shown by cat ~/.ssh/id_rsa.pub has worked so, why I can't just add any public key? – simo Nov 10 '14 at 04:34