Issue
When running the task as non-root, as in task/git-clone/git-clone.yaml:
securityContext:
runAsNonRoot: true
runAsUser: 65532
It will fail when cloning a repo via SSH:
Error running git [fetch --recurse-submodules=yes ...]: exit status 128\nNo user exists for uid 65532\r\nfatal: Could not read from remote repository...
The reason is that SSH expects the user to exist, i.e. in /etc/passwd, see openssh.
Reproduce
docker run -u 65532 --rm -it --entrypoint=sh ghcr.io/tektoncd-catalog/git-clone:v1.2.0 -c "ssh -vvv git@github.com"
will fail with:
No user exists for uid 65532
Workaround
Run task as root (remove the securityContext).
Issue
When running the task as non-root, as in task/git-clone/git-clone.yaml:
It will fail when cloning a repo via SSH:
The reason is that SSH expects the user to exist, i.e. in
/etc/passwd, see openssh.Reproduce
will fail with:
Workaround
Run task as root (remove the
securityContext).