[ci skip] Ensure the /root/.ssh directory exists before copying the user's public key into the vm
This commit is contained in:
1 parent
45e53d3d9d
commit
9dfa7ccee6
1 file changed
+1
-1
Vendored
+1
-1
@@ -52,6 +52,6 @@ Vagrant::configure("2") do |config|
|
|||||||
|
|
||||||
if Pathname.new(PUBLIC_KEY_PATH).exist?
|
if Pathname.new(PUBLIC_KEY_PATH).exist?
|
||||||
config.vm.provision :file, source: PUBLIC_KEY_PATH, destination: '/tmp/id_rsa.pub'
|
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
|
||||||
end
|
end
|
||||||
Reference in new issue
Block a user