Skip to content

Instantly share code, notes, and snippets.

@vpack
Created January 29, 2016 23:39
Show Gist options
  • Save vpack/901f5a45d77c90b53f53 to your computer and use it in GitHub Desktop.
Save vpack/901f5a45d77c90b53f53 to your computer and use it in GitHub Desktop.
Jenkins - Private Repo Config

Generate Keys

$ ssh-keygen -f ~/.ssh/bitbucket.pem

Files bitbucket.pem and bitbucket.pem.pub will be generated.

Load this bitbucket.pem.pub key as a deploy key to your bitbucket repo.

$ cat ~/.ssh/config ; echo
Host bitbucket.org
     HostName bitbucket.org
     IdentityFile ~/.ssh/bitbucket.pem
     StrictHostKeyChecking no
     UserKnownHostsFile /dev/null

Use this format in Jenkins and it will not require a password or ssh key anymore.

ssh://[email protected]/scholastic-chef/schl_tomcat8.git

By configuring this Berkshelf can also pull cookbooks from a private chef/ cookbook repos. ** Just load the deploy key to those repos as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment