-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --compat-auth-file to login and logout #20621
Add --compat-auth-file to login and logout #20621
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mtrmac The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Ephemeral COPR build failed. @containers/packit-build please check. |
4f5bd19
to
1592f18
Compare
e805eef
to
3fd29ec
Compare
Manually smoke-tested operation and interoperability with # docker pull localhost:5000/foo
Using default tag: latest
Error response from daemon: Head "http://localhost:5000/v2/foo/manifests/latest": no basic auth credentials
# bin/podman login --tls-verify=false --compat-auth-file ~/.docker/config.json localhost:5000
Username: …
Password:
Login Succeeded!
# docker pull localhost:5000/foo
Using default tag: latest
Error response from daemon: manifest for localhost:5000/foo:latest not found: manifest unknown: manifest unknown
# bin/podman logout --compat-auth-file ~/.docker/config.json localhost:5000
Removed login credentials for localhost:5000
# docker pull localhost:5000/foo
Using default tag: latest
Error response from daemon: Head "http://localhost:5000/v2/foo/manifests/latest": no basic auth credentials |
3fd29ec
to
ebd50ae
Compare
test/e2e/login_logout_test.go
Outdated
setup := SystemExec("bash", []string{"-c", "systemctl status docker 2>&1"}) | ||
|
||
if setup.LineInOutputContains("Active: inactive") { | ||
setup = SystemExec("systemctl", []string{"start", "docker"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far it seems that this test always skips, because docker
is not installed on our CI systems. If so, I should just rip this untested code out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I have dropped that.
ebd50ae
to
599de20
Compare
599de20
to
4b516ca
Compare
For the record, in case I am not around: containers/buildah#5143 needs to be merged first, and then the DO NOT MERGE: Use bud tests from UNMERGED buildah commit needs to be dropped. Other than that (and presumably merge conflicts on |
4b516ca
to
07fe0ad
Compare
Hopefully mergeable now. Cc: @TomSweeneyRedHat |
@mtrmac Bud tests are failing, looks like the error text differs. |
... to include containers/image#2173, containers/common#1731 and containers/buildah#5143 . Signed-off-by: Miloslav Trmač <[email protected]>
Signed-off-by: Miloslav Trmač <[email protected]>
This mostly just inherits the c/common/pkg/auth implementation, except that AuthFilePath and DockerCompatAuthFilePath can not be set simultaneously, so don't unnecessarily explicitly set AuthFilePath. c/common already handles that. Signed-off-by: Miloslav Trmač <[email protected]>
07fe0ad
to
d0b3225
Compare
If I understand that correctly, I need to vendor Buildah’s |
LGTM |
@mheon this seems to be taking forever and then some. Is that expected? |
/lgtm |
Add
--compat-auth-file
to login/logout, allowing to update Docker-compatible files.This mostly inherits the feature from c/common/pkg/auth.
Completely untested at this point.TBD tests that the updated files can be correctly consumed by Docker.
Fixes: #18617 (users will need to switch to the new option)
Does this PR introduce a user-facing change?