Skip to content
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

podman login should use credential helper if configured #1675

Closed
TomSweeneyRedHat opened this issue Oct 17, 2018 · 20 comments · Fixed by #3015 or containers/image#950
Closed

podman login should use credential helper if configured #1675

TomSweeneyRedHat opened this issue Oct 17, 2018 · 20 comments · Fixed by #3015 or containers/image#950
Assignees
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-issue

Comments

@TomSweeneyRedHat
Copy link
Member

docker login' uses a credential helper. If you try to do docker login` without a credential helper in play you get a warning:

# docker login https://quay.io
Username: tomsweeneyredhat
Password:
WARNING! Your password will be stored unencrypted in
/root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

podman login should also use a credential helper as Docker does.

@TomSweeneyRedHat TomSweeneyRedHat self-assigned this Oct 17, 2018
@vrothberg
Copy link
Member

After reading this issue, I realized that podman doesn't offer docker's --password-stdin flag. Is there a reason for that? If not, we could this together in the same PR.

@rhatdan
Copy link
Member

rhatdan commented Nov 20, 2018

No reason, just an oversight.

@rhatdan
Copy link
Member

rhatdan commented Dec 22, 2018

@TomSweeneyRedHat Can you add this feature --password-stdin?

@TomSweeneyRedHat
Copy link
Member Author

@rhatdan ack

@rhatdan
Copy link
Member

rhatdan commented Mar 8, 2019

@QiWang19 Could you look into the passwork helper now also?

@rhatdan
Copy link
Member

rhatdan commented Apr 13, 2019

@QiWang19 Did you ever look into this?

@QiWang19
Copy link
Collaborator

QiWang19 commented Apr 25, 2019

I saw the code in containers/image, podman already supported configure "credHelpers", but only works for root user.
https://github.com/containers/image/blob/ff926d3c79684793a2135666a2cb738f44ba33dc/pkg/docker/config/config.go#L43

I need to make this fix #3015 to make podman support credHelpers using code from containers/image, but only works for root user

@rhatdan
Copy link
Member

rhatdan commented Apr 25, 2019

I thought we got this to work if we did not enter the user namepspace on podman login?

@QiWang19
Copy link
Collaborator

I mean the pulling error you mentioned.
login/logout works for non-root if getting out of the user namespace, but pull command can't read the credential.

@rhatdan
Copy link
Member

rhatdan commented Apr 25, 2019

Yes we have to work with @giuseppe on that one. Perhaps we grab credentials before going into user namespace.

@rhatdan
Copy link
Member

rhatdan commented Apr 25, 2019

Or can we specify a user name to get the credentials?

@sdlarsen
Copy link

Was this ever fixed?

@mheon
Copy link
Member

mheon commented Feb 21, 2020

Was closed by PR #3015 in Podman 1.3.0. Are you still seeing it?

@TomSweeneyRedHat
Copy link
Member Author

I'm not convinced that credential-helpers and credstores are handled as they should be by podman/buildah login/logout. There are certainly no tests or documentation anywhere that I can find. I'm going to reopen this until we can at least verify, fix if necessary, and create appropriate tests and documentation.

@sdlarsen
Copy link

Yes @mheon, I see it. Running podman 1.8.0

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Mar 24, 2020

@QiWang19 I believe we support credential helpers now, can we close this issue?

@TomSweeneyRedHat
Copy link
Member Author

I've not been able to get this to work, might be a personal issue. I'm also not able to see any documenation. If you can point me to documenation that shows how this works, we can close this. Otherwise as a minimum we need to document this before closing this issue.

@vrothberg
Copy link
Member

@QiWang19 can you help Tom test?

QiWang19 added a commit to QiWang19/image that referenced this issue Jun 4, 2020
Add documentation for credHelper. Close containers/podman#1675

Signed-off-by: Qi Wang <qiwan@redhat.com>
QiWang19 added a commit to QiWang19/image that referenced this issue Jun 4, 2020
Add documentation for credHelper. Close containers/podman#1675

Signed-off-by: Qi Wang <qiwan@redhat.com>
@QiWang19
Copy link
Collaborator

QiWang19 commented Jun 4, 2020

Open a PR containers/image#950 to add documentation for credential helpers, but this only works for root, rootless login with credential helper doesn't work because of the d-bus issue. Should add note to the documentation that credential only works for root, and close this issue, or just leave this open? I already have filed a issue #4123 about the rootless podman using credential helper.

QiWang19 added a commit to QiWang19/image that referenced this issue Jun 4, 2020
Add documentation for credHelper. Close containers/podman#1675

Signed-off-by: Qi Wang <qiwan@redhat.com>
QiWang19 added a commit to QiWang19/image that referenced this issue Jun 4, 2020
Add documentation for credHelper. Close containers/podman#1675

Signed-off-by: Qi Wang <qiwan@redhat.com>
QiWang19 added a commit to QiWang19/image that referenced this issue Jun 4, 2020
Add documentation for credHelper. Close containers/podman#1675

Signed-off-by: Qi Wang <qiwan@redhat.com>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-issue
Projects
None yet
6 participants