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
Windows: Pulling images without full names in Powershell causes "short-name resolution enforced but cannot prompt without a TTY" #16417
Comments
Thanks for reaching out, @duoduobingbing! The code in question is here: https://github.com/containers/image/blob/main/pkg/shortnames/shortnames.go#L355-L367 Pulling in our windows expert for advice. @n1hility WDYT? |
Isn't this the problem that windows and MacOS use the remote client and the remote client cannot prompt? |
For some reason I thought, the prompting works for remote clients but you are right. We decided against attempting to do it because it would be massive change breaking backwards compat and very hard to keep stable since too many commands and code paths would need to prompt. Thanks for pointing that out, @Luap99.
|
Of course:
That's sad but understable. Nonetheless, it would have been very nice to have the select dialogue in Powershell as well. |
The issue is the Windows image has 4 registries defined, where as podman machine on a MAC only lists docker.io. We need to change the image we use in WSL by default to not have multiple registries. @n1hility WDYT? |
We'd be seeing this everywhere if that was actually the case. I suspect Podman on WSL in general is fine, but we have an environment issue here that has cause the registries to not be modified on machine creation. |
Let's have a look at the code. I recall doing enforcing docker.io via ignition. Did something change? |
WSL does not use ignition AFAIK, it uses completely different setup code compared tp the qemu backend. |
@rhatdan Yeah I agree. This should be changed to mirror. I'll send a PR today. @Luap99 is correct that WSL based provisioning takes a different path since its not CoreOS based (instead derived from base Fedora). In this case it's taking the package defaults. |
Thanks folks. Here's the ignition code: https://github.com/containers/podman/blob/main/pkg/machine/ignition.go#L428-L446 It worries me that Windows and Mac differ for configuring the machines. Maybe we can find a way to consolidate parts of the setting up the machine. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
Description
Running podman on Windows, running e.g.
podman pull eclipse-temurin:17
in PowerShell causesError: short-name resolution enforced but cannot prompt without a TTY
.I know that this can be worked around by either prepending
docker.io/
to the requested image name or by settingshort-name-mode="permissive"
, however it would be nice to get the repo select dialogue in Powershell as well, because the first workaround cannot be performed because I am in a setting where I am not the owner of a greater amount of Dockerfiles that would need changing in order to prepend the prefix.Using
winpty
did not work:C:\Program` Files\Git\usr\bin\winpty podman pull eclipse-temurin:17
still results inError: short-name resolution enforced but cannot prompt without a TTY
Steps to reproduce the issue:
Install podman-*.exe
Run
podman machine init
&podman machine start
Run
podman pull eclipse-temurin:17
Describe the results you expected:
The repo select list should be displayed
Describe the results you received:
Error: short-name resolution enforced but cannot prompt without a TTY
is shown insteadOutput of
podman version
:Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
Additional details/info
age
for Windows had a similar problem with Powershell and solved it this wayThe text was updated successfully, but these errors were encountered: