有没有办法与Berkshelf一起使用私人git存储库 [英] Is there a way to use private git repository with Berkshelf

查看:159
本文介绍了有没有办法与Berkshelf一起使用私人git存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一本名为 foo 的烹饪书,并希望与 Berkshelf 一起使用。



我在 Berksfile 中写道:

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

然后将cookbook供应给 cookbooks 目录,但它失败,出现如下错误:

<$ p $
解决cookbook依赖...
从https://bitbucket.org/ironsand/cookbook-foo.git(在master)获取'foo'
用户名为'https://bitbucket.org':

如何告诉ssh用户名和关键 Berkshelf
当然,我的用户有权访问git仓库。

解决方案

如果您想使用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.

这篇关于有没有办法与Berkshelf一起使用私人git存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆