Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package git-image for openSUSE:Factory checked in at 2026-03-17 19:04:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/git-image (Old) and /work/SRC/openSUSE:Factory/.git-image.new.8177 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "git-image" Tue Mar 17 19:04:52 2026 rev:46 rq:1339458 version:unknown Changes: -------- --- /work/SRC/openSUSE:Factory/git-image/git-image.changes 2026-03-11 20:55:19.829951117 +0100 +++ /work/SRC/openSUSE:Factory/.git-image.new.8177/git-image.changes 2026-03-17 19:06:28.129573298 +0100 @@ -1,0 +2,5 @@ +Mon Mar 16 21:31:23 UTC 2026 - SUSE Update Bot <[email protected]> + +- support non-root use + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ Dockerfile ++++++ --- /var/tmp/diff_new_pack.ISUjpc/_old 2026-03-17 19:06:28.657595181 +0100 +++ /var/tmp/diff_new_pack.ISUjpc/_new 2026-03-17 19:06:28.665595512 +0100 @@ -27,7 +27,7 @@ RUN set -euo pipefail; \ export PERMCTL_ALLOW_INSECURE_MODE_IF_NO_PROC=1; \ - zypper -n --installroot /target --gpg-auto-import-keys install --no-recommends git-core openssh-clients + zypper -n --installroot /target --gpg-auto-import-keys install --no-recommends git-core openssh-clients shadow # sanity check that the version from the tag is equal to the version of git-core that we expect RUN set -euo pipefail; \ [ "$(rpm --root /target -q --qf '%{version}' git-core | \ @@ -63,4 +63,10 @@ LABEL org.opensuse.release-stage="released" # endlabelprefix LABEL io.artifacthub.package.readme-url="%SOURCEURL_WITH(README.md)%" +RUN set -euo pipefail; useradd -r -u 1000 -g 0 -d /workspace -s /bin/bash git +RUN set -euo pipefail; mkdir -p /workspace && chown git:0 /workspace && chmod 775 /workspace +WORKDIR /workspace +ENV HOME=/workspace + +VOLUME /workspace ++++++ README.md ++++++ --- /var/tmp/diff_new_pack.ISUjpc/_old 2026-03-17 19:06:28.701597004 +0100 +++ /var/tmp/diff_new_pack.ISUjpc/_new 2026-03-17 19:06:28.705597169 +0100 @@ -20,7 +20,35 @@ As Git requires a repository, the container does not explicitly set an entrypoint. This way, you can launch the container in -interactive mode to clone a repository and work on it. To avoid losing all your changes when exiting the container, use a persistent volume mount on launch. +interactive mode to clone a repository and work on it. The `/workspace` directory is declared as a volume to persist changes. + +Example with volume mounting for persistence: + +```ShellSession +$ podman run -it -v $(pwd):/workspace:Z registry.opensuse.org/opensuse/git:2.53 git clone <repository-url> +``` + +Example running as a non-root user: + +```ShellSession +$ podman run -it --user git --userns=keep-id -v $(pwd):/workspace:Z registry.opensuse.org/opensuse/git:2.53 git clone <repository-url> +``` + +Or with your host user ID: + +```ShellSession +$ podman run -it --user $(id -u):$(id -g) --userns=keep-id -v $(pwd):/workspace registry.opensuse.org/opensuse/git:2.53 git clone <repository-url> +``` + +## Cloning Private Repositories + +To clone private repositories that require SSH authentication, mount your SSH directory into the container: + +```ShellSession +$ podman run -it --user $(id -u):$(id -g) --userns=keep-id -v $(pwd):/workspace:Z -v ~/.ssh:/workspace/.ssh:Z registry.opensuse.org/opensuse/git:2.53 git clone <private-repository-url> +``` + +Ensure your SSH private key has the correct permissions (e.g., `chmod 600 ~/.ssh/id_rsa` on the host) and that your SSH configuration is set up properly. For more use cases and documentation, refer to the [Git SCM documentation](https://git-scm.com/doc).
