Skip to content

Commit 74917f0

Browse files
pcapriottibgandon
authored andcommitted
Add --global to all git configuration commands
1 parent fb9fd00 commit 74917f0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

git.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,16 @@ func (g *GitClient) Init(branch string) error {
6969
if err := g.command("git", "checkout", "-b", branch).Run(); err != nil {
7070
return fmt.Errorf("checkout to '%s' failed: %s", branch, err)
7171
}
72-
if err := g.command("git", "config", "user.name", "concourse-ci").Run(); err != nil {
72+
if err := g.command("git", "config", "--global", "user.name", "concourse-ci").Run(); err != nil {
7373
return fmt.Errorf("failed to configure git user: %s", err)
7474
}
75-
if err := g.command("git", "config", "user.email", "concourse@local").Run(); err != nil {
75+
if err := g.command("git", "config", "--global", "user.email", "concourse@local").Run(); err != nil {
7676
return fmt.Errorf("failed to configure git email: %s", err)
7777
}
78-
if err := g.command("git", "config", "url.https://[email protected]/.insteadOf", "[email protected]:").Run(); err != nil {
78+
if err := g.command("git", "config", "--global", "url.https://[email protected]/.insteadOf", "[email protected]:").Run(); err != nil {
7979
return fmt.Errorf("failed to configure github url: %s", err)
8080
}
81-
if err := g.command("git", "config", "url.https://.insteadOf", "git://").Run(); err != nil {
81+
if err := g.command("git", "config", "--global", "url.https://.insteadOf", "git://").Run(); err != nil {
8282
return fmt.Errorf("failed to configure github url: %s", err)
8383
}
8484
return nil

0 commit comments

Comments
 (0)