Skip to content

Commit

Permalink
🤫 auth when listing git repo refs
Browse files Browse the repository at this point in the history
🤫 auth when listing git repo refs
  • Loading branch information
petar-cvit authored Apr 12, 2024
2 parents 8f73fdc + 65f56df commit 1c7ead2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cyclops-ctrl/internal/template/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,13 @@ func clone(repoURL, commit string, creds *auth.Credentials) (billy.Filesystem, e
tagPrefix := "refs/tags/"
remote, err := repo.Remote(remoteName)
if err != nil {
panic(err)
return nil, err
}
refList, err := remote.List(&git.ListOptions{})
refList, err := remote.List(&git.ListOptions{
Auth: httpBasicAuthCredentials(creds),
})
if err != nil {
panic(err)
return nil, err
}

var reference *plumbing.Reference
Expand Down

0 comments on commit 1c7ead2

Please sign in to comment.