vagrant setup throws Permission denied (publickey) when cloning git

I’m trying to run vagrant setup on clients given Vagrantfile to setup his puppet project into my development environment, I’ve never used or heard about Vagrant before,

its throws the following errors

REPO: /var/www/project/project-puppet/deploy/vagrant/hiera/common
SETUP: Cloning ssh:// 
Cloning into '/var/www/project/project-puppet/deploy/vagrant/hiera/common'... 
Permission denied (publickey). 
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.

Path: /var/www/project/project-puppet/Vagrantfile
Line number: 113
Message: Errno::ENOENT: No such file or directory - /var/www/project/project-puppet/deploy/vagrant/hiera/common

P.S: I’m using Ubuntu 15.04

And Vagrant 1.7.4

  • Berkshelf vendoring of cookbook on private Bitbucket repository
  • Cannot clone private repo from Vagrant provision file
  • Can't clone from Git on Vagrant box
  • CRLF issue when running Django via Vagrant on Windows 7
  • Vagrant within VCS
  • Best practice for multiple vagrant boxes
  • Vagrant and git bash
  • How to properly manage a git repo in a subdirectory, ignored by the parent directory, as its own project?
  • 2 Solutions collect form web for “vagrant setup throws Permission denied (publickey) when cloning git”

    First, do you have pull permission?
    If yes, have you set up your ssh key for access to this repo via an ssh connection? If not, set it up.

    A guide on github for setting up for ssh access. (Similar for different git hosts)

    ssh key generation

    You don’t seem to have access to the remote repository because it doesn’t recognise/find your SSH key. You should have a file like ~/.ssh/ or ~/.ssh/

    If you don’t, you can create a new key by running ssh-keygen -t rsa from a console. Just follow the steps and you should end up with a .ssh/ file in your homedir.

    Make sure your client gets that public key (do not send your private key (id_rsa file), that’s only for you to use/see). Once they have it and allow it access to the repository, you should be able to clone it.

    Git Baby is a git and github fan, let's start git clone.