Description
Issue Description
TL;DR We cannot use a tilde for the identity on windows for system connections: podman should either prevent user to do it, or resolve the path
I was following the https://github.com/containers/podman/blob/main/docs/tutorials/remote_client.md tutorial and the part about adding the connections let me think I could use ~
for the identity.
podman/docs/tutorials/remote_client.md
Line 81 in 1e4287d
Steps to reproduce the issue
Steps to reproduce the issue
- be on windows
- have a distant podman machine running
- add connection with a tilde
~
$: podman system connection add remote-tilde --identity ~/.ssh/id_ed25519 ssh://<user>@<ip>/run/user/1000/podman/podman.sock
Describe the results you received
$: podman --connection=remote-tilde info
OS: windows/amd64
provider: wsl
version: 5.4.0
Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM
Error: unable to connect to Podman socket: failed to read identity "~/.ssh/id_ed25519": open ~/.ssh/id_ed25519: The system cannot find the path specified
Describe the results you expected
The proper output of podman info
of the remote
podman info output
podman version 5.4.0
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
N/A
Additional information
When we use podman system connection add
we call the following code
podman/cmd/podman/system/connection/add.go
Line 144 in 72f1617
which is inside the https://github.com/containers/common repository, specifically the problem occurs on key, err := os.ReadFile(path)
1.