include auth when fetching specific specs (#1796)

Signed-off-by: ygelfand <yuri@shlitz.com>
This commit is contained in:
ygelfand
2021-12-23 11:36:19 -05:00
committed by GitHub
parent 2cb0387758
commit b3ec974cfc
+1
View File
@@ -96,6 +96,7 @@ func (g *Git) UnpackTarFromBuildContext() (string, error) {
if fetchRef != "" {
err = r.Fetch(&git.FetchOptions{
RemoteName: "origin",
Auth: getGitAuth(),
RefSpecs: []config.RefSpec{config.RefSpec(fetchRef + ":" + fetchRef)},
})
if err != nil && !errors.Is(err, git.NoErrAlreadyUpToDate) {