I have tried everything including generating new key, adding to the GitHub account, editing .ssh/config and .git/config. But still it was giving me the same error. Then I tried following command and it does work successfully.
ssh-agent bash -c 'ssh-add ~/.ssh/id_rsa; git clone [email protected]:username/repo.git'