V3: prevent git's 'dubious ownership' error

This commit is contained in:
Tim Hockin 2023-03-16 12:43:30 -07:00
parent d457decbdd
commit c1564ce083
No known key found for this signature in database
1 changed files with 4 additions and 0 deletions

View File

@ -1285,6 +1285,10 @@ func setupDefaultGitConfigs(ctx context.Context) error {
// How to manage credentials (for those modes that need it).
key: "credential.helper",
val: "cache --timeout 3600",
}, {
// Our working root is safe (avoid a "dubious ownership" error).
key: "safe.directory",
val: "*",
}}
for _, kv := range configs {
if _, err := cmdRunner.Run(ctx, "", nil, *flGitCmd, "config", "--global", kv.key, kv.val); err != nil {