Skip to content

Instantly share code, notes, and snippets.

@spetersson
Created January 2, 2018 09:26
Show Gist options
  • Save spetersson/8d8c043e2567aadd746a3708f937b775 to your computer and use it in GitHub Desktop.
Save spetersson/8d8c043e2567aadd746a3708f937b775 to your computer and use it in GitHub Desktop.
Issue is that we are trying to use deploy keys in Github with r10k, and each github repo needs it's own private key
root@foreman:/etc/puppetlabs/code/environments/test# /opt/puppetlabs/puppet/bin/r10k -c /etc/puppetlabs/r10k/r10k.yaml puppetfile install -v debug2
...
[2018-01-02 10:21:33 - DEBUG] /etc/puppetlabs/code/environments/test/modules/foreman is already at Git ref master
[2018-01-02 10:21:33 - INFO] Updating module /etc/puppetlabs/code/environments/test/modules/nnse_icinga
[2018-01-02 10:21:33 - DEBUG1] Creating new git cache for "git@github.com:org/puppet-nnse-icinga.git"
[2018-01-02 10:21:33 - DEBUG2] Starting process: ["git", "clone", "--mirror", "git@github.com:org/puppet-nnse-icinga.git", "/var/cache/r10k/git@github.com-org-puppet-nnse-icinga.git"]
[2018-01-02 10:21:35 - DEBUG2] Finished process:
Command: git clone --mirror git@github.com:org/puppet-nnse-icinga.git /var/cache/r10k/git@github.com-org-puppet-nnse-icinga.git
Stderr:
Cloning into bare repository '/var/cache/r10k/git@github.com-org-puppet-nnse-icinga.git'...
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Exit code: 128
[2018-01-02 10:21:35 - ERROR] Command exited with non-zero exit code:
Command: git clone --mirror git@github.com:org/puppet-nnse-icinga.git /var/cache/r10k/git@github.com-org-puppet-nnse-icinga.git
Stderr:
Cloning into bare repository '/var/cache/r10k/git@github.com-org-puppet-nnse-icinga.git'...
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Exit code: 128
[2018-01-02 10:21:35 - DEBUG1] No unmanaged contents in /etc/puppetlabs/code/environments/test/modules, nothing to purge
mod 'nnse_icinga',
:git => 'git@github.com:org/puppet-nnse-icinga.git',
:branch => 'development'
# The location to use for storing cached Git repos
:cachedir: '/var/cache/r10k'
# A list of git repositories to create
:sources:
# This will clone the git repository and instantiate an environment per
# branch in /etc/puppetlabs/code/environments
:production:
remote: 'git@internal-gitlab:org/puppet-base.git'
basedir: '/etc/puppetlabs/code/environments'
git:
# Default for non specified repos
:private_key: '/root/.ssh/id_rsa'
:username: 'git'
:repositories:
- remote: "git@github.com:org/puppet-nnse-icinga.git"
private_key: '/root/.ssh/github/puppet-nnse-icinga'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment