我创建了一个名为foo
的食谱,并希望与Berkshelf
一起使用。
我在Berksfile
中写了这样的内容:
cookbook 'foo', git: 'https://bitbucket.org/ironsand/cookbook-foo.git'
然后将cookbook提供给cookbooks
目录,但它失败了,错误如下:
berks vendor cookbooks
Resolving cookbook dependencies...
Fetching 'foo' from https://bitbucket.org/ironsand/cookbook-foo.git (at master)
Username for 'https://bitbucket.org':
如何告诉Berkshelf
的ssh用户名和密钥?
当然我的用户有权访问git存储库。
答案 0 :(得分:12)
如果要对git提供程序使用ssh身份验证,则需要使用SSH URL。尝试这样的事情:
cookbook 'foo', git: 'git@bitbucket.org/ironsand/cookbook-foo.git'
这将使用您的SSH密钥进行身份验证。