-
Notifications
You must be signed in to change notification settings - Fork 4.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
WSL SSH key error when not running in user directory or WSL filesystem #8742
Comments
Temporary solution could be to create a wrapper that issues the following: #!/bin/bash
sudo -e PATH="${PATH}" vagrant $@ (as WSL translates user to root) but there is still file permission problem (should be 0600). A workaround is to create symlink: mv .vagrant ~/.project-vagrant
ln -sv ~/.project-vagrant .vagrant |
Vagrant will ignore file permission checks when the path is within the path set in the
The relevant env var documentation is located here: https://www.vagrantup.com/docs/other/wsl.html#vagrant_wsl_windows_access_user_home_path The details of the impact each of those env vars still needs to be added, and this ticket will be closed once they have been included. |
@chrisroberts thank you |
@chrisroberts thanks for that, solved my problem. Do you know if I can add this env var to a config file or something, so I don't need to run it every morning after I log in? |
@dthunder746 You could put it in ~/.bash-profile, ~/.profile or, preferrably not, in ~/.bashrc |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Vagrant version
Host operating system
Microsoft Windows 10 Pro Version 10.0.15063 Build 15063, running vagrant from the WSL
Guest operating system
centos/7 base box
Vagrantfile
Debug output
https://gist.github.com/robwiss/9642b52c8f108082c34de94645f26448
Expected behavior
Vagrant should remove the insecure private key and insert the new private key.
Actual behavior
Vagrant fails to insert the new private key if the directory containing the Vagrantfile is not located in the WSL filesystem or the Windows user's home directory.
Error is as follows:
See the debug output for full error info.
Steps to reproduce
The text was updated successfully, but these errors were encountered: