【发布时间】:2015-06-01 14:46:38
【问题描述】:
我正在竭尽全力让 Berkshelf 从我们的私有 BitBucket (git) 存储库下载公司食谱。这是在 Windows 8.1 主机上。
我找到了this question 并尝试了答案中描述的内容。我还尝试了 Atlassian 建议的关于 here 的说明,尤其是在他们的页面上关于 ssh for multiple identities 的说明。
- 我使用 puttygen 生成了一个公钥,并将其作为部署密钥添加到 Bitbucket 存储库。
- 我将私钥保存在
C:\Users\MyUser\.ssh\mykey.ppk。 -
我添加了
C:\Users\MyUser\.ssh\config,内容如下:Host mycompany HostName bitbucket.org IdentityFile ~/.ssh/mykey.ppk -
我尝试像这样将食谱包含在 berksfile 中:
cookbook 'mycookbook', git: "git@mycompany:myteam/mycookbook.git", protocol: :ssh
当我运行$ berks install -d 时,我得到:
Fetching 'mycookbook' from git@mycompany:myteam/mycookbook.git (at master)
Enter passphrase for key '/c/Users/MyUser/.ssh/mykey.ppk':
Git error: command `git clone git@mycompany:myteam/mycookbook.git "C:/Users/MyUser/.berkshelf/.cache/git/6d5b957656d1bda26bf05aea558176c86db263f2" --bare --no
-hardlinks` failed. If this error persists, try removing the cache directory at 'C:/Users/MyUser/.berkshelf/.cache/git/6d5b957656d1bda26bf05aea558176c86db263f2'.Output from the command:
Cloning into bare repository 'C:/Users/MyUser/.berkshelf/.cache/git/6d5b957656d1bda26bf05aea558176c86db263f2'...
Permission denied (publickey).
fatal: Could not read from remote repository.
知道为什么这不起作用吗?
我必须用我的用户名替换@前面的“git”吗?
另外 - 请注意,它要求我输入 ppk 的密码,我只是用 `enter' 确认,因为我把它留空了。但它不应该在没有提示的情况下直接阅读吗?
【问题讨论】:
标签: git ssh vagrant bitbucket berkshelf