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

  • git revert <hash> not allowed due to a merge but no -m option was given
  • Undoing accidental git stash pop
  • Setup ssh server to forward connections
  • Sparse checkout and shallow clone
  • How can I stop git subtree split from un-squashing everything?
  • Git hash search engine
  • 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

  • Using Git on Windows not working when the password contain '@' Symbol
  • git-only command to restore a directory to a commit state
  • Git and DiffTool problems : What do LOCAL and REMOTE point to?
  • Get a list of changed files between two commits or branches
  • gitk: How to tell it “stop, don't load more commits”?
  • Remove large commits from git
  • 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.