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 Code Manager or 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.

    For more information about these parameters, refer to Configuring Git settings for Code Manager or Configuring Git settings for r10k.

    To make these changes, you must follow the steps described in Customize Code Manager configuration in Hiera and Customizing r10k configuration.