Skip to content

Commit

Permalink
Resolve fatal: detected dubious ownership in repository at '/workspac…
Browse files Browse the repository at this point in the history
…e/source'
  • Loading branch information
coreydaley committed Aug 15, 2023
1 parent dcf328d commit 650fb27
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/git/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,11 @@ func clone(ctx context.Context) error {
return err
}

safeDirectoryArgs := []string{"config", "--global", "--add", "safe.directory", flagValues.target}
if _, err := git(ctx, safeDirectoryArgs...); err != nil {
return err
}

revision := flagValues.revision
if revision == "" {
// user requested to clone the default branch, determine the branch name
Expand Down

0 comments on commit 650fb27

Please sign in to comment.