LoginSignup
2
2

More than 5 years have passed since last update.

Vagrant v1.8.5 以降で、vagrant ユーザのprivate keyのパーミッションがおかしいために、rsyncでファイルの同期ができないバグ

Last updated at Posted at 2016-08-03

解消方法

vagrant/plugins/guests/linux/cap/public_key.rb に、以下の変更を加える。

Windowsなら、
C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.8.5\plugins\guests\linux\cap\public_key.rbです。

@@ -54,6 +54,7 @@
             if test -f ~/.ssh/authorized_keys; then
               grep -v -x -f '#{remote_path}' ~/.ssh/authorized_keys > ~/.ssh/authorized_keys.tmp
               mv ~/.ssh/authorized_keys.tmp ~/.ssh/authorized_keys
+              chmod 0600 ~/.ssh/authorized_keys
             fi

             rm -f '#{remote_path}'

つい先日(7月19日)にBug Fixされてた。
Authentication failure after inserting new key with Vagrant 1.8.5. [PATCH] #7610

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2