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:
- git add .
- git commit -m "comment"
- git push origin master
The
above commands will add the public key of particular user to the <git
or gitolite user>/.ssh/authorized_keys file in below format:
- command="/usr/share/gitolite/gl-auth-command
user-name-here",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty
<user pubkey here>
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!