Turns out that Pier One supports OAuth2 tokens smuggled via HTTP Basic auth, which means we can fix login issues and at the same time make pierone login something that the users only need to run once.
Drop all arguments from pierone login except the optional --url option (they didn't do anything anyway).
Add a docker-credential-pierone binary which uses zign to get a token and prints it in the format compatible with Docker.
pierone login now removes the old-style configuration (auths.…) and simply configures the registry to use the new credentials helper.
pierone.api.docker_login and pierone.api.docker_login_with_token are kept just in case someone relies on them, but they now print deprecation warnings. We can remove them later.
Fixes #81, #87, #91. Should also fix #86, but I'm not sure.
Coverage decreased (-0.1%) to 79.898% when pulling 9c1c00fc363158f496056d8d5e1237b4628064c0 on cred-helper into dc7a7328b557fd16f4ae799c4d166bcb657c6398 on master.
Turns out that Pier One supports OAuth2 tokens smuggled via HTTP Basic auth, which means we can fix login issues and at the same time make
pierone login
something that the users only need to run once.pierone login
except the optional--url
option (they didn't do anything anyway).docker-credential-pierone
binary which useszign
to get a token and prints it in the format compatible with Docker.pierone login
now removes the old-style configuration (auths.…
) and simply configures the registry to use the new credentials helper.pierone.api.docker_login
andpierone.api.docker_login_with_token
are kept just in case someone relies on them, but they now print deprecation warnings. We can remove them later.Fixes #81, #87, #91. Should also fix #86, but I'm not sure.