I have a gerrit setup on my server with http as a authentication method and nginx as server. I've created a admin account which works perfectly fine. I was trying to set up a another account with command

ssh -p 29418 admin@host gerrit create-account --group "'someGroup'" --email user@example.com --http-password "'somePassword'" user

and everything looked fine but now I'm not able to log into this account. I can find in nginx error log of gerrit site this error:

user "user" was not found in "/etc/nginx/.htpasswd"

Should I put this password of new user somewhere?


This command creates a Gerrit account but it has nothing to do with authentication on Nginx side, I mean Nginx does not know of accounts in Gerrit so it won't let you pass through basic auth.

HTTP authentication in Gerrit means that www-server handles the authentication, Gerrit simply checks Authorization header.

You should add an entry for the new user to /etc/nginx/.htpasswd to make it work.

|improve this answer|||||
  • I see, but in that case what is the purpose of this http-password parameter? – kebie Nov 11 '17 at 22:50
  • Honestly I don't know. I couldn't find any use case for --http-password, probably you may use it with some external auth provider or with some gerrit plugin. – Paweł Tatarczuk Nov 12 '17 at 10:09
  • Documentation says http-password may be used to authenticate Git over HTTP and REST API: gerrit-review.googlesource.com/Documentation/… – Paweł Tatarczuk Nov 12 '17 at 10:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.