I'm pulling my hair out trying to get Berkshelf to download a company cookbook from our private BitBucket (git) repository. This is on a Windows 8.1 host.
I found this question and have attempted what was described in the answer. I also played around with the instructions Atlassian advises about here and especially on their page about ssh for multiple identities.
- I have generated a public key with puttygen and added it as a deployment key to Bitbucket repo.
- I saved the private key in
C:\Users\MyUser\.ssh\mykey.ppk
. I added
C:\Users\MyUser\.ssh\config
with the following contents:Host mycompany HostName bitbucket.org IdentityFile ~/.ssh/mykey.ppk
I try to include the cookbook in berksfile like this:
cookbook 'mycookbook', git: "git@mycompany:myteam/mycookbook.git", protocol: :ssh
When I run $ berks install -d
I get:
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.
Any idea why this is not working?
Do I have to replace 'git' in front of the @ with my user name?
Also - note that it asks me for the passphrase of the ppk, which I just confirm with `enter' as I left it blank. But shouldn't it just read it without prompting for it?