fix(git): add authentication option to pull function
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/push/deploy unknown status

This commit is contained in:
Tom Neuber 2024-12-07 02:55:10 +01:00
parent 00d4e46319
commit 7589ed990b
Signed by: tom
GPG key ID: F17EFE4272D89FF6

View file

@ -179,6 +179,10 @@ func (p *Project) Pull(ctx context.Context) error {
ReferenceName: plumbing.NewBranchReferenceName(p.Branch), ReferenceName: plumbing.NewBranchReferenceName(p.Branch),
} }
if p.auth != nil {
pullOpts.Auth = p.auth
}
if p.writer != nil { if p.writer != nil {
pullOpts.Progress = p.writer pullOpts.Progress = p.writer
} }