Is there a way to use private git repository with Berkshelf

扶醉桌前 提交于 2019-12-08 19:49:46

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/26214497/is-there-a-way-to-use-private-git-repository-with-berkshelf

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!