Merge pull request #4854 from tonistiigi/fix-push-auth

pusher: add missing authentication support for requests
This commit is contained in:
Akihiro Suda 2020-12-16 22:35:10 +09:00 committed by GitHub
commit 7fa02f3afb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)