Skip to content

Commit 60ccc80

Browse files
pcapriottiScott Schulthess
authored andcommitted
Add --global to all git configuration commands
1 parent 1fb210f commit 60ccc80

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

git.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ func (g *GitClient) Init(branch string) error {
8383
if err := g.command("git", "checkout", "-b", branch).Run(); err != nil {
8484
return fmt.Errorf("checkout to '%s' failed: %s", branch, err)
8585
}
86-
if err := g.command("git", "config", "user.name", "concourse-ci").Run(); err != nil {
86+
if err := g.command("git", "config", "--global", "user.name", "concourse-ci").Run(); err != nil {
8787
return fmt.Errorf("failed to configure git user: %s", err)
8888
}
89-
if err := g.command("git", "config", "user.email", "concourse@local").Run(); err != nil {
89+
if err := g.command("git", "config", "--global", "user.email", "concourse@local").Run(); err != nil {
9090
return fmt.Errorf("failed to configure git email: %s", err)
9191
}
9292

@@ -108,7 +108,7 @@ func (g *GitClient) Init(branch string) error {
108108
}
109109
}
110110

111-
if err := g.command("git", "config", "url.https://.insteadOf", "git://").Run(); err != nil {
111+
if err := g.command("git", "config", "--global", "url.https://.insteadOf", "git://").Run(); err != nil {
112112
return fmt.Errorf("failed to configure github url: %s", err)
113113
}
114114
return nil

0 commit comments

Comments
 (0)