V4: prevent git's 'dubious ownership' error
This commit is contained in:
parent
f287d63171
commit
45c7b89674
|
|
@ -1967,6 +1967,10 @@ func (git *repoSync) SetupDefaultGitConfigs(ctx context.Context) error {
|
||||||
// How to manage credentials (for those modes that need it).
|
// How to manage credentials (for those modes that need it).
|
||||||
key: "credential.helper",
|
key: "credential.helper",
|
||||||
val: "cache --timeout 3600",
|
val: "cache --timeout 3600",
|
||||||
|
}, {
|
||||||
|
// Mark repos as safe (avoid a "dubious ownership" error).
|
||||||
|
key: "safe.directory",
|
||||||
|
val: "*",
|
||||||
}}
|
}}
|
||||||
for _, kv := range configs {
|
for _, kv := range configs {
|
||||||
if _, err := git.Run(ctx, "", "config", "--global", kv.key, kv.val); err != nil {
|
if _, err := git.Run(ctx, "", "config", "--global", kv.key, kv.val); err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue