-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Podman Image SCP transfer patch #12224
Conversation
Still blows up for me.
|
$ ./bin/podman image scp root@localhost::alpine .
|
@rhatdan The transfer command has to be run as root which explains the alpine not found error, and the syntax you're trying to use of But that panic should not be happening even with the incorrect arguments, I'll take another look. |
Why would I need to run as root? This makes the command a lot less useful if it needs to be run as root. If this only works as root, then it should have failed with that message. |
@rhatdan sorry, I am confused, are you running those commands you are showing me using sudo? The command was designed to be run using sudo. Any attempt to invoke sudo within the rootless proces led to the following error:
I can try to mess around with this again but that led me down the rabbit hole of creating a new user NS which most people agreed was too complicated for the task at hand. |
I am not running this command as sudo. I am running it as a rootless user. |
I think we can figure out how to not enter the user namespace in the situation where we want to use sudo. But for now fix the crash. |
okay, I will look into this a bit because I agree it is much less useful this way. |
Still segfaulting:
|
@rhatdan I am not getting that error but I am pushing a different fix for syntax, let me know if that fixes your issue. |
That is better at least gets rid of the crash, but the error makes not sense to a human being. Error: cannot transfer images from any user besides root using sudo: invalid argument As a user of this tool, I would have no idea what that meant. |
Fixed syntax so that podman image scp transfer works with no user specified. This command can only be executed as root so to obtain the default user, I searched for the SUDO_USER environmental variable. If that is not found, we error out and inform the user to set this variable and make sure they are running as root Signed-off-by: cdoern <[email protected]> Signed-off-by: cdoern <[email protected]>
Ok I will merge, but this is still needs to work for rootless users. /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cdoern, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixed syntax so that podman image scp transfer works with no user specified.
This command can only be executed as root so to obtain the default user, I searched for
the SUDO_USER environmental variable.
If that is not found, we error out and inform the user
to set this variable and make sure they are running as root.
the two functional syntax forms are now:
sudo podman image scp root@localhost::IMAGE
and
sudo podman image scp root@localhost::IMAGE USER@localhost::
Signed-off-by: cdoern [email protected]