If you are getting this error from Bitbucket:
Permission denied (publickey). fatal: Could not read from remote repository.
It means that bitbucket doesn’t have your public key. You need to generate one if you don’t have it or upload it.
To generate one follow these instructions here.
Next, you want to add this to your key ring. Run this command:
> ssh-add -K "nameofkey"
Finally, got to “Manage Account” in your user profile, SSH Keys -> Add key.
Then you should be good to go!