fix(argo): add git safe.directory for PVC-persisted checkout
The cargo-target PVC retains the source checkout between workflow runs. When the container UID differs from the PVC owner, git refuses to operate with "dubious ownership" error. Adding safe.directory resolves this. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -179,6 +179,9 @@ spec:
|
||||
REPO="ssh://git@gitlab-gitlab-shell.foxhunt.svc.cluster.local:2222/root/foxhunt.git"
|
||||
BUILD="/cargo-target/src"
|
||||
|
||||
# PVC may be owned by a different UID from a previous run
|
||||
git config --global --add safe.directory "$BUILD"
|
||||
|
||||
# Persistent checkout on PVC — only changed files get new mtimes,
|
||||
# so cargo skips recompiling unchanged workspace crates.
|
||||
if [ -d "$BUILD/.git" ]; then
|
||||
|
||||
Reference in New Issue
Block a user