smith icon indicating copy to clipboard operation
smith copied to clipboard

Credentials not used for upload to private Docker repository with basic auth

Open aecolley opened this issue 8 years ago • 1 comments

When using smith upload -d -r https://jruser:[email protected]/reponame, the blobs POST is made without the username and password credentials. The private registry I'm using (artifactory) rejects the attempt with a 403 code because of the missing credentials.

(When I changed PrepPutObject to use req.SetBasicAuth, artifactory responded with a 404 due to a bug of its own, but that's beside the point.)

The code seems to be customized to the public Docker registry and its associated token server, and not to private ones which use the recommended basic auth setup.

aecolley avatar Oct 11 '17 15:10 aecolley

The docker registry as well as the private registry I use only sends the password credentials on the initial auth request and then uses token auth for the actual uploads. Am I correct in understanding that the artifactory registry expects basic auth headers to be sent on every request? We can definitely make that change although this seems to be different from how the official registries work.

vishvananda avatar Oct 11 '17 16:10 vishvananda