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

"inappropriate ioctl for device" with --password-stdin and an empty password #1855

Open
salotz opened this issue Feb 9, 2024 · 2 comments
Open
Labels

Comments

@salotz
Copy link

salotz commented Feb 9, 2024

I run Gitlab CI on my Kubernetes cluster, in which I use skopeo in jobs to copy container images around.

I am using the latest quay.io/skopeo/stable:latest image.

I login using credentials using:

cat $SKOPEO_PUBLISH_CREDENTIALS | skopeo login -v --username _json_key --password-stdin $GAR_HOST

Sometimes this will result in this error:

Password: time="2024-02-09T01:11:37Z" level=fatal msg="getting username and password: reading password: inappropriate ioctl for device"

I suspect it has something to do with the particular node or shell environment because rerunning a failed usually continues to fail when in close time-proximity.

Any ideas why this could be happening?

@salotz
Copy link
Author

salotz commented Feb 9, 2024

I found the issue. The file wasn't created. --debug helped, but would be nice if the default error message told you something more useful.

@salotz salotz closed this as completed Feb 9, 2024
@mtrmac
Copy link
Collaborator

mtrmac commented Feb 9, 2024

Then… let’s track that as an open bug?

Thanks for reporting it.


AFAICS:
In pkg/auth.Login, if opts.StdinPassword is set, but stdin is empty, we still end up calling getUserAndPass and trying to read the password interactively, again, from the same stdin (which we have already read until EOF, so it can’t possibly help). And that interactive read is trying to use stdin as a TTY.

@mtrmac mtrmac reopened this Feb 9, 2024
@mtrmac mtrmac changed the title "inappropriate ioctl for device" error with skopeo login in CI "inappropriate ioctl for device" with --password-stdin and an empty password Feb 9, 2024
@mtrmac mtrmac transferred this issue from containers/skopeo Feb 9, 2024
@mtrmac mtrmac added the kind/bug label Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants