@@ -31,6 +31,7 @@ import (
31
31
"github.com/fluxcd/pkg/version"
32
32
33
33
"github.com/fluxcd/source-controller/pkg/git"
34
+ "github.com/fluxcd/source-controller/pkg/git/libgit2/managed"
34
35
)
35
36
36
37
// CheckoutStrategyForOptions returns the git.CheckoutStrategy for the given
@@ -72,7 +73,7 @@ func (c *CheckoutBranch) Checkout(ctx context.Context, path, url string, opts *g
72
73
CheckoutBranch : c .Branch ,
73
74
})
74
75
if err != nil {
75
- return nil , fmt .Errorf ("unable to clone '%s': %w" , url , gitutil .LibGit2Error (err ))
76
+ return nil , fmt .Errorf ("unable to clone '%s': %w" , managed . EffectiveURL ( url ) , gitutil .LibGit2Error (err ))
76
77
}
77
78
defer repo .Free ()
78
79
head , err := repo .Head ()
@@ -101,7 +102,7 @@ func (c *CheckoutTag) Checkout(ctx context.Context, path, url string, opts *git.
101
102
},
102
103
})
103
104
if err != nil {
104
- return nil , fmt .Errorf ("unable to clone '%s': %w" , url , gitutil .LibGit2Error (err ))
105
+ return nil , fmt .Errorf ("unable to clone '%s': %w" , managed . EffectiveURL ( url ) , gitutil .LibGit2Error (err ))
105
106
}
106
107
defer repo .Free ()
107
108
cc , err := checkoutDetachedDwim (repo , c .Tag )
@@ -125,7 +126,7 @@ func (c *CheckoutCommit) Checkout(ctx context.Context, path, url string, opts *g
125
126
},
126
127
})
127
128
if err != nil {
128
- return nil , fmt .Errorf ("unable to clone '%s': %w" , url , gitutil .LibGit2Error (err ))
129
+ return nil , fmt .Errorf ("unable to clone '%s': %w" , managed . EffectiveURL ( url ) , gitutil .LibGit2Error (err ))
129
130
}
130
131
defer repo .Free ()
131
132
oid , err := git2go .NewOid (c .Commit )
@@ -157,7 +158,7 @@ func (c *CheckoutSemVer) Checkout(ctx context.Context, path, url string, opts *g
157
158
},
158
159
})
159
160
if err != nil {
160
- return nil , fmt .Errorf ("unable to clone '%s': %w" , url , gitutil .LibGit2Error (err ))
161
+ return nil , fmt .Errorf ("unable to clone '%s': %w" , managed . EffectiveURL ( url ) , gitutil .LibGit2Error (err ))
161
162
}
162
163
defer repo .Free ()
163
164
0 commit comments