Skip to content

Commit

Permalink
include auth when fetching specific specs (#1796)
Browse files Browse the repository at this point in the history
Signed-off-by: ygelfand <yuri@shlitz.com>
  • Loading branch information
ygelfand committed Dec 23, 2021
1 parent 2cb0387 commit b3ec974
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/buildcontext/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b3ec974

Please sign in to comment.