Git asks for password when pushing to bitbucket or github

First check that you’ve properly set up a ~/.ssh/config file with following parameters:


Host bitbucket.org
Hostname bitbucket.org
Identityfile /root/.ssh/id_rsa
User myusername

Also check that you’ve clone the repo using the
git clone [email protected]:username

rather than the

git clone https://[email protected]/username/securessh.git
url

If you use HTTPS it always asks for a password.