VCsrepo指定要使用的ssh密钥 [英] VCsrepo specifying ssh key to use
问题描述
我正在尝试编写一个模块,在该模块中,木偶将获取SVN存储库,并且我希望它使用特定的密钥来获取存储库.如何在SVN VCSrepo中指定ssh密钥?
I am trying to write a module in which puppet will be fetching an SVN repo and i want it to use a specific key in order to fetch the repository. How can I specify a ssh key to in SVN VCSrepo?
在文档上,它说我们可以使用vcsrepo来管理ssh密钥,但没有有关SVN的任何示例,请访问其网站
On the documentation it says we can use vcsrepo for managing ssh keys but there isn't any example for SVN on how to do it at their website
推荐答案
当然,这有点令人困惑.文档说明
Well, it's a little confusing, to be sure. The documentation states
当您的源使用SSH(例如"username @ server:…")时,您可以使用vcsrepo中的require元参数来使用Puppet管理SSH密钥,以确保它们存在.
When your source uses SSH, such as 'username@server:…', you can manage your SSH keys with Puppet using the require metaparameter in vcsrepo to ensure they are present.
这意味着您可以通过独立资源(例如
This implies that you manage the key through an independent resource, e.g.
file { '/home/svn-user/.ssh/id_rsa': ... }
关于您的问题,文档看起来不太有希望,可悲的是:
As to your question, the documentation doesn't look very promising, sadly:
- 有一个
ssh_identity
功能,但仅在git
和hg
提供程序中存在 - 对于这些提供商,您可以使用
identity
参数指定密钥
- there is a
ssh_identity
feature, but it is only present for thegit
andhg
providers - for those providers, you can use the
identity
parameter to specify your key
我不确定从此功能中排除svn
背后的原因.对于puppet-dev邮件列表或Freenode上的#puppet-dev
IRC频道,这似乎是一个有效的问题.
I'm not sure about the reasoning behind excluding svn
from this feature. This seems like a valid question to the puppet-dev mailing list or the #puppet-dev
IRC channel on Freenode.
这篇关于VCsrepo指定要使用的ssh密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!