pusher: add missing authentication support for requests

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi 2020-12-15 17:39:25 -08:00
parent e922d5553d
commit 4dfec7fa01

View File

@ -138,7 +138,7 @@ func (p dockerPusher) Push(ctx context.Context, desc ocispec.Descriptor) (conten
// //
// for the private repo, we should remove mount-from // for the private repo, we should remove mount-from
// query and send the request again. // query and send the request again.
resp, err = preq.do(pctx) resp, err = preq.doWithRetries(pctx, nil)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -238,7 +238,7 @@ func (p dockerPusher) Push(ctx context.Context, desc ocispec.Descriptor) (conten
go func() { go func() {
defer close(respC) defer close(respC)
resp, err := req.do(ctx) resp, err := req.doWithRetries(ctx, nil)
if err != nil { if err != nil {
respC <- response{err: err} respC <- response{err: err}
pr.CloseWithError(err) pr.CloseWithError(err)