Instead of using a separate port for Gitlab ssh, I use a one-liner ssh proxy on the host (using a technique described at StackOverflow), and thus I have git user on the host with system (<1000) uid. This works perfectly fine until I recreate or upgrade the Gitlab container, which resets the permissions and I have to manually run:
chmod +x /srv/gitlab/data/.ssh
chmod +r /srv/gitlab/data/.ssh/authorized_keys
I would appreciate it there were a environment variable that would do the same automatically. (Frankly, I believe the SSH forwarding setup should be documented and popularized, as it allows cleaner setup without weird port repository URLs.)
Just in case, I am aware about USERMAP_UID/USERMAP_GID but in some circumstances it's not convenient (e.g. it breaks linking to sameersbn/redmine container which expects them to be 1000).
Instead of using a separate port for Gitlab ssh, I use a one-liner ssh proxy on the host (using a technique described at StackOverflow), and thus I have
gituser on the host with system (<1000) uid. This works perfectly fine until I recreate or upgrade the Gitlab container, which resets the permissions and I have to manually run:I would appreciate it there were a environment variable that would do the same automatically. (Frankly, I believe the SSH forwarding setup should be documented and popularized, as it allows cleaner setup without weird port repository URLs.)
Just in case, I am aware about
USERMAP_UID/USERMAP_GIDbut in some circumstances it's not convenient (e.g. it breaks linking tosameersbn/redminecontainer which expects them to be 1000).