Declare module or data content with SSH private key authentication
To declare content protected by SSH private keys, declare the content as a Git repository, and then configure the private key setting in your code management tool.
- Declare the Git repository in your Puppetfile, using the Git repo's SSH URL. For example:
mod 'myco/privatemod', :git => 'git@git.example.com:myco/privatemod.git'
If modifying the Puppetfile triggers a code deployment, expect the code deployment to fail. You must complete the next step to get a successful code deployment. - Configure the private key settings by modifying the following r10k parameters in Hiera:
- To set a key for all Git operations, use the
private key setting under
git-settings
. - To set a private key for an individual remote repository, set the private key
in the
repositories
hash ingit-settings
for each specific remote.
- To set a key for all Git operations, use the
private key setting under
What to do next After completing both steps, you might need to manually trigger a code
deployment.