Bitbucket has error after git push
Problem: Warning message
Warning: Permanently added ‘bitbucket.org,220.127.116.11’ (RSA) to the list of known hosts. firstname.lastname@example.org: Permission denied (publickey).
while executing git push command.
Solution: We necessary right configure SSH keys.
Step 1. Go to home user directory (usually, it available after successfully ssh connected) and check the availability file id_rsa.pub located to /home/username/.ssh/ . If file exist go to step 2, else creating an ssh pair for user authentication use command:
Step 2. Copy content the file id_rsa.pub and paste to Bitbucket Settings - SSH Keys - Add key
Step 3. Add your SSH private key to the ssh-agent:
Step 4. Check configure file setup:
it must have next contain:
Host bitbucket.org IdentityFile ~/.ssh/id_rsa.pub
Step 5. Connect via SSH directly:
ssh -Tvv email@example.com