From 9dfa7ccee6335c9ae484bf67b2c9fa91121722e6 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 25 Mar 2015 02:51:51 -0400 Subject: [PATCH] [ci skip] Ensure the /root/.ssh directory exists before copying the user's public key into the vm --- Vagrantfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index bb349d0d1..5a4a0ad8e 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -52,6 +52,6 @@ Vagrant::configure("2") do |config| if Pathname.new(PUBLIC_KEY_PATH).exist? config.vm.provision :file, source: PUBLIC_KEY_PATH, destination: '/tmp/id_rsa.pub' - config.vm.provision :shell, :inline => "rm -f /root/.ssh/authorized_keys && cp /tmp/id_rsa.pub /root/.ssh/authorized_keys" + config.vm.provision :shell, :inline => "rm -f /root/.ssh/authorized_keys && mkdir -p /root/.ssh && sudo cp /tmp/id_rsa.pub /root/.ssh/authorized_keys" end end