0

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 [email protected] --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?

1 Answer 1

0

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.

3
  • I see, but in that case what is the purpose of this http-password parameter?
    – kebie
    Nov 11, 2017 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. Nov 12, 2017 at 10:09
  • Documentation says http-password may be used to authenticate Git over HTTP and REST API: gerrit-review.googlesource.com/Documentation/… Nov 12, 2017 at 10:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .