Closed raghavendrapj closed 5 years ago
Hi there. I think GERRIT_USER is designed to be used as a build time and run time environment variable. From the beginning of the Dockerfile, a user is created according to the $GERRIT_USER. Other commands are run under the same user id by using gosu. If you want to switch the user id at runtime then you need to create the switched user before starting gerrit daemon. I wonder how can you achieve that in docker container.
We are working on a SaaS solution and are using gerrit 2.13.x for gerrit deployments, We were always passing GERRIT_USER so that gerrit application runs as GERRIT_USER and the entire application lifecycle can be managed externally.
The Gerrit is up (running as GERRIT_USER), but fails in Replication plugin, though i have added the right set of keys in GERRIT_USER's home directory which is /var/gerrit/.ssh/known_hosts it fails with following error.
However, If i dont pass in the GERRIT_USER it works fine and replication plugin is also working as expected. Is it not possible for me to run Gerrit as a different user?
I have already tried with invalidating the cache with following command but fails.
ssh -p 29418 user@localhost gerrit flush-caches --cache sshkeys