Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to use private git repository with Berkshelf

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.

like image 449
ironsand Avatar asked Oct 06 '14 10:10

ironsand


Video Answer


1 Answers

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: '[email protected]/ironsand/cookbook-foo.git'

That will use your SSH key to authenticate.

like image 159
Tejay Cardon Avatar answered Oct 02 '22 13:10

Tejay Cardon