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.

  1. 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.
  2. 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 in git-settings for each specific remote.
What to do next After completing both steps, you might need to manually trigger a code deployment.