【发布时间】:2016-01-05 18:11:49
【问题描述】:
我正在尝试在给定 Vagrantfile 的客户上运行 vagrant setup 以将他的 puppet 项目设置到我的开发环境中,我以前从未使用或听说过 Vagrant,
它会引发以下错误
REPO: /var/www/project/project-puppet/deploy/vagrant/hiera/common
SETUP: Cloning ssh://git@source.sanoma.com:7999/devops/hiera-common.git
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:我使用的是 Ubuntu 15.04
和流浪者 1.7.4
【问题讨论】:
-
setup不是vagrant的公认选项 - 您可能想知道您正在使用哪个版本 (vagrant version) 和插件(如果有)(特别是提供此新选项的插件) ) 你可以运行vagrant plugin list也可以分享你的 Vagrantfile 可能会帮助其他人支持你 -
来自虚拟机,你能不能
git clone ssh://git@source.sanoma.com:7999/devops/hiera-common.git- 如果你有同样的错误,有很多文章讨论过这个问题 -
您似乎没有远程存储库的读取权限。请您的客户允许您访问它。他们将需要您的公共 SSH 密钥(通常可以在您的主目录中的
.ssh/id_rsa.pub或.ssh/id_dsa.pub下找到。 -
@Oldskool 实际上我没有钥匙,他们说
do you have defined your SSH key in your profile?所以我认为这会解决问题 -
@riksof-zeeshan 似乎是问题所在,是的。我在下面添加了更多详细信息的答案。