Skip to content
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

Rsync permission denied, but vagrant ssh works #272

Open
chornobils opened this issue Jan 24, 2018 · 0 comments
Open

Rsync permission denied, but vagrant ssh works #272

chornobils opened this issue Jan 24, 2018 · 0 comments

Comments

@chornobils
Copy link

After asking passphrase and creating a droplet Vagrant tries to copy synced folders, and it output is:

UserKnownHostsFile=/dev/null -i 'C:/Users/Admin/.ssh/digocean'" "--exclude" ".vagrant/" "--exclude" ".gitignore" "--exclude" "vendor/" "--exclude" "README.md" "--exclude" ".git" "--exclude" "node_modules/" "/cygdrive/c/Coding/project/" "[email protected]:/var/www/project"
Error: This rsync lacks old-style --compress due to its external zlib.  Try -zz.
Continuing without compression.

Permission denied (publickey).
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.2]

Vagrantfile:

  override.ssh.private_key_path = '~/.ssh/digocean'
  override.vm.box = 'digital_ocean'
  override.vm.box_url = "https://github.com/devopsgroup-io/vagrant-digitalocean/raw/master/box/digital_ocean.box"
  override.nfs.functional = false
  provider.token = '<TOKEN>'
  provider.ssh_key_name = 'mykey'
  provider.image = 'ubuntu-16-04-x64'
  provider.region = 'fra1'
  provider.size = '512mb'
end
vmconfig.vm.synced_folder "../sites/project", "/var/www/project",
                                  type: "rsync",
                                  rsync__args: ["--verbose", "--archive", "-z"],
                                  rsync__exclude: [".vagrant/", ".gitignore", "vendor/", "README.md", ".git", "node_modules/"]
vmconfig.vm.synced_folder ".", "/vagrant", disabled: true
vmconfig.vm.synced_folder "../provisioners/nginx", "/vagrant/provisioners/nginx"

Moreover, I can login in droplet with vagrant ssh successfully. I tried to remove first synced folder for running rsync without custom parameters, after that Vagrant shows error with 3rd synced folder in output. Also I tried connect with ssh keys and without -o key option, mentioned above ssh -p 22 -i 'C:/Users/Admin/.ssh/digocean' [email protected], and it connected successfully.

Host Windows 10 x64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant