Bitbucket has error after git push
Problem: Warning message
Warning: Permanently added ‘bitbucket.org,126.96.36.199’ (RSA) to the list of known hosts. email@example.com: 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 firstname.lastname@example.org