I haven't changed the SSH key for the bitbucket for a while. All of sudden, it stopped working and I am seeing the following error from my source tree and command line.
Pushing to ssh://git@bitbucket.example.com:7998/project1/com.example.frontend.git
git@bitbucket.example.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Pushing to ssh://git@bitbucket.example.com:7998/project1/com.example.frontend.git
git@bitbucket.example.com: Permission denied (publickey).
fatal: Could not read from remote repository.
I had to change the host/url for this post.
So I went inside the directory where this project is and ran this command, but got the same error.
git push
git@bitbucket.example.com: Permission denied (publickey).
fatal: Could not read from remote repository.
When I ran 'git config --list', I see the full list of config with my user name/company email/remote origin url.
I checked my public SSH key(which is in my account in BitBucket) with my local ssh key under ~/.ssh. It is identical.
Is there anything else that I can check or try?
Thanks.