@@ -69,16 +69,16 @@ func (g *GitClient) Init(branch string) error {
69
69
if err := g .command ("git" , "checkout" , "-b" , branch ).Run (); err != nil {
70
70
return fmt .Errorf ("checkout to '%s' failed: %s" , branch , err )
71
71
}
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 {
73
73
return fmt .Errorf ("failed to configure git user: %s" , err )
74
74
}
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 {
76
76
return fmt .Errorf ("failed to configure git email: %s" , err )
77
77
}
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 {
79
79
return fmt .Errorf ("failed to configure github url: %s" , err )
80
80
}
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 {
82
82
return fmt .Errorf ("failed to configure github url: %s" , err )
83
83
}
84
84
return nil
0 commit comments