Geo: could not change directory to root Permission denied
When running the GitLab Geo replication setup, step 6 is to confirm the secondary can connect to the primary database.
6. Test that the gitlab-psql user can connect to the primary site’s database (the default Omnibus database name is gitlabhq_production):
sudo \
-u gitlab-psql /opt/gitlab/embedded/bin/psql \
--list \
-U gitlab_replicator \
-d "dbname=gitlabhq_production sslmode=verify-ca" \
-W \
-h <primary_site_ip>
After running this command the below output is displayed to the user.
could not change directory to "/root": Permission denied
This output has no relation to the command running and the command still works and passes. The output is confusing and can cause users to stop the process as they think something is now broken.
Related to #225865 (closed)
Edited by Sunjung Park