Skip to content

Commit 4d4d7f5

Browse files
author
Scott Schulthess
committed
fix testS
1 parent 17a664d commit 4d4d7f5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

git.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ func (g *GitClient) Init(branch string) error {
9797
return fmt.Errorf("failed to configure github url: %s", err)
9898
}
9999
} else {
100+
filePath := "/tmp/git-resource-private-key"
100101
err := ioutil.WriteFile(filePath, []byte(g.PrivateKey), 0600)
101102
if err != nil {
102103
fmt.Println("Error writing private key:", err)
@@ -107,10 +108,6 @@ func (g *GitClient) Init(branch string) error {
107108
if err := g.command("git", "config", "credential.https://github.com.helper", helperStr).Run(); err != nil {
108109
return fmt.Errorf("failed to configure github url: %s", err)
109110
}
110-
} else {
111-
if err := g.command("git", "config", "url.https://[email protected]/.insteadOf", "[email protected]:").Run(); err != nil {
112-
return fmt.Errorf("failed to configure github url: %s", err)
113-
}
114111
}
115112
return nil
116113
}

0 commit comments

Comments
 (0)