Skip to content

Commit d4cee55

Browse files
committed
Fix bootstrap when using github:// URL
1 parent d5da855 commit d4cee55

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cmd/bootstrap.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,18 @@ func bootstrapCommand(cmd *cobra.Command, args []string) {
6666
return
6767
}
6868

69+
cloneUrl := repoUrl.SSH()
70+
6971
if repoUrl.IsHTTPS() {
72+
cloneUrl = repoUrl.HTTPS()
7073
viper.Set("force-https-repos", true)
7174
}
7275

7376
if bootstrapShallowClone {
7477
viper.Set("checkout.shallow-clone", true)
75-
git.Git("clone", "--depth=1", "--no-single-branch", repoUrl.URL, bootstrapCheckoutPath)
78+
git.Git("clone", "--depth=1", "--no-single-branch", cloneUrl, bootstrapCheckoutPath)
7679
} else {
77-
git.Git("clone", repoUrl.URL, bootstrapCheckoutPath)
80+
git.Git("clone", cloneUrl, bootstrapCheckoutPath)
7881
}
7982

8083
utils.InDirectory(bootstrapCheckoutPath, func() {

0 commit comments

Comments
 (0)