Gitolite is asking password even key is configured correctly

To fix following kind of errors:
gitolite is asking for password when we close as below:
$git clone user@server:repository
Error: public key/password mismatch or Enter password

After lot of research we found that, gitolite is completely depends on ssh. In gitolite-admin, we have keydir for all pub keys for a particular user and conf/gitolite.conf for repository access. When we add a new user, we are executing below commands:
The above commands will add the public key of particular user to the <git or gitolite user>/.ssh/authorized_keys file in below format:

So check the /home/git/.ssh/authorized_keys file whether particular user has an associated key added in above format or not. If not add manually which will fix the issue.

Further troubleshooting step can be found here!

Learn & Earn