Hey all,
The company I work for has 300+ WordPress all managed poorly by a single outsourced employee who manages them all over FTP. Updating them or keeping them uniform is - as you might guess - challenging. I’ve decided I’d like to take over managing these sites internally using trellis, bedrock & a sage based template and am now working on getting the entire suite up and running locally so I can test how feasible this will be. However I am stuck on the vagrant up call, as I keep getting errors there.
I’ll post the error first in case it is a common occurring one you recognize immediately - though I searched beforehand and found nothing - before I describe how I got there:
TASK [python_interpreter : Get Ubuntu release] *********************************
System info:
Ansible 2.8.4; Vagrant 2.2.7; Linux
Trellis HeadFailed to connect to the host via ssh: Warning: Permanently added
‘[127.0.0.1]:2222’ (ECDSA) to the list of known hosts.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for ‘/mnt/d/dev/repos/example.com/trellis/.vagrant/machines/
default/virtualbox/private_key’ are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key “/mnt/d/dev/repos/example.com/trellis/.vagrant/machines/default/virt
ualbox/private_key”: bad permissions
vagrant@127.0.0.1: Permission denied (publickey,password).
fatal: [default]: UNREACHABLE! => {“changed”: false, “unreachable”: true}PLAY RECAP *********************************************************************
default : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
Now background: This is a newish 16GB ram pc with a i7-8750H running Windows 10, freshly formatted with nothing installed prior except for Firefox, Node, NPM, JetBrains Toolkit, Jetbrains PhpStorm, Git and GitHub Desktop dev-wise.
- Installed the latest version of Vagrant (2.2.7) on my Windows host machine
- Enabled Windows Subsystems for Linux by running ‘Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux’ in PowerShell as Administrator, then rebooted
- Downloaded and installed the latest Ubuntu 18 from the Windows Store
- Once in WSL, I followed the instructions at roots io getting-started/docs/windows-basic-setup/, with the exception that I had no ~/.ssh/config, so I made it using touch and added the configuration the linked page.
- Tested my configuration by running ‘ssh -T git@github.com’ and got a ‘permission error’, so I ran ‘chmod 600 ~/.ssh/config’ to fix it
- Installed the same version of Vagrant on Ubuntu and added both ‘export VAGRANT_WSL_ENABLE_WINDOWS_ACCESS=“1”’ or ‘export PATH=“$PATH:/mnt/c/Program Files/Oracle/VirtualBox”’
- Followed the instructions on roots io getting-started/docs/windows-development-environment-trellis/ with the exception that I had to specify ansible version 2.8.4 as this was the latest version supported by Trellis I believe.
- Afterwards I created a trellis project as per roots io trellis/docs/installing-trellis/ and was hoping I was ready to start development as per root io trellis/docs/local-development-setup/, but I can’t get ‘vagrant up’ to work.
- Destroying the box, removing the the trellis project, running ‘export VAGRANT_WSL_WINDOWS_ACCESS_USER_HOME_PATH=“/mnt/d/dev/repos”’’ (/mnt/d/dev/repos being my repo directory) and repeating the previous step changed nothing.
Anyone have experience with installing Trellis on Windows that could point me in the right direction?
Thanks in advance
PS: Sorry about the mangled links, small editor and I can only post 4 links at a time it seems.