I have strictly followed whole tutorial "Set up SSH for Git and Mercurial on Mac OSX/Linux" on my Ubuntu Server 12 LTS. I have generated public key and added it to account settings on BitBucket site. In Ubuntu, if I type:
ssh -T git@bitbucket.org
I can see proper welcome message:
logged in as username.
You can use git or hg to connect to Bitbucket. Shell access is disabled.
But when I try to clone (or push) any repository:
Cloning into 'directory'...
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
What is the problem?