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

mgradm upgrade podman list doesn't should tags or error when not authenticated #372

Closed
rjmateus opened this issue Jun 21, 2024 · 2 comments · Fixed by #407
Closed

mgradm upgrade podman list doesn't should tags or error when not authenticated #372

rjmateus opened this issue Jun 21, 2024 · 2 comments · Fixed by #407
Assignees

Comments

@rjmateus
Copy link
Member

When we run the command mgradm upgrade podman list without being authenticated we don't get any tags and it finishes with success.
We should try to provide some insides in case the registry needs authentication to return the tags.
image

@mbussolotto
Copy link
Member

mbussolotto commented Jul 8, 2024

it should be an easy fix, this part of code should be added in list function

inspectedHostValues, err := utils.InspectHost(false)
if err != nil {
return utils.Errorf(err, L("cannot inspect host values"))
}
pullArgs := []string{}
_, scc_user_exist := inspectedHostValues["host_scc_username"]
_, scc_user_password := inspectedHostValues["host_scc_password"]
if scc_user_exist && scc_user_password && strings.Contains(serverImage, "registry.suse.com") {
pullArgs = append(pullArgs, "--creds", inspectedHostValues["host_scc_username"]+":"+inspectedHostValues["host_scc_password"])
}
preparedImage, err := podman.PrepareImage(serverImage, image.PullPolicy, pullArgs...)
if err != nil {
return err
}

@mbussolotto mbussolotto self-assigned this Jul 18, 2024
@mbussolotto
Copy link
Member

I'll verify it on top of #400, I think now just

authFile, cleaner, err := shared_podman.PodmanLogin()

would be enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants