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

remote: ssh: don't evaluate the keyfile path when setting it in the config #1608

Closed
efiop opened this issue Feb 13, 2019 · 3 comments

Comments

2 participants
@efiop
Copy link
Member

commented Feb 13, 2019

E.g. running

dvc remote modify myremote keyfile ~/.ssh/id_rsa

will result in /home/user/.ssh/id_rsa being written to .dvc/config, which is wrong and might lead to confusion https://discuss.dvc.org/t/dvc-pull-fails-without-sudo/114/7 .

@efiop efiop added the bug label Feb 13, 2019

@efiop efiop added this to To do in Weekly tasks via automation Feb 13, 2019

@mroutis mroutis self-assigned this Feb 22, 2019

@mroutis

This comment has been minimized.

Copy link
Collaborator

commented Feb 28, 2019

@efiop , path expansion is happening on the shell, you need to wrap it on quotes if you want to prevent this behavior (e.g. dvc remote modify remote keyfile "~/.ssh/id_rsa")

@mroutis

This comment has been minimized.

Copy link
Collaborator

commented Feb 28, 2019

We can remove the /home/$USER section on the path and replace it with ~.

@efiop

This comment has been minimized.

Copy link
Member Author

commented Feb 28, 2019

@mroutis I don't think that is a good idea, we will not be able to distinguish between cases where it is intended and where it is not. Great point about shell expansion though! So this is not an issue after all.

@efiop efiop closed this Feb 28, 2019

Weekly tasks automation moved this from To do to Done Feb 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.