Skip to content

The cosign login command stores incorrect creds under /root/.docker/config.json #4120

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

Open
dpateriya opened this issue Mar 20, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@dpateriya
Copy link

Description

The cosign login command does not validate the credentials against the registry server and directly puts the credentials into the `/root/.docker/config.json`
$ cosign login quay.io -u username
logged in via /root/.docker/config.json
[root@vm-236-142 ~]# cat /root/.docker/config.json
{
	"auths": {
		"quay.io": {
			"auth": "dXNlcm5hbWUK"
		}
	}
}

The correct behaviour would be to ask for the password via prompt and once the creds are validated, the /root/.docker/config.json file should be updated. This leads to problems when signing the images.

Version

GitVersion: v2.4.3
GitCommit: 6a7abbf3ae7eb6949883a80c8f6007cc065d2dfb
GitTreeState: clean
BuildDate: 2025-02-19T19:34:52Z
GoVersion: go1.23.6
Compiler: gc
Platform: linux/amd64
@dpateriya dpateriya added the bug Something isn't working label Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant