且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

有没有办法与Berkshelf一起使用私人git存储库

更新时间:2022-12-12 23:37:00

如果您想使用ssh身份验证git provider,你需要使用一个SSH URL。尝试如下所示:

  cookbook'foo',git:'git@bitbucket.org/ironsand/cookbook-foo.git '

这将使用您的SSH密钥进行身份验证。


I created a cookbook named foo, and want to use with Berkshelf.

I wrote like this in Berksfile:

cookbook 'foo', git: 'https://bitbucket.org/ironsand/cookbook-foo.git'

Then vendor the cookbook to cookbooks directory, but it failed with error like this:

berks vendor cookbooks
Resolving cookbook dependencies...
Fetching 'foo' from https://bitbucket.org/ironsand/cookbook-foo.git (at master)
Username for 'https://bitbucket.org':

How can I tell ssh username and key to Berkshelf? Of course my user have right to access the git repository.

If you want to use ssh authentication with your git provider, you need to use an SSH URL. Try something like this:

cookbook 'foo', git: 'git@bitbucket.org/ironsand/cookbook-foo.git'

That will use your SSH key to authenticate.