DEV Community

surajmohan-m
surajmohan-m

Posted on

Configure Jenkins shared library in Git using SSH keys

In this article I would like to share my experience configuring a Jenkins shared library in a Git repository. As I am using Windows sever, I used puttygen to generate the SSH keys.

Create SSH keys using PuTTYgen

  • Download PuTTYgen

  • Install it and open. Click Generate button

Image description

  • Move the cursor randomly

Image description

  • Save private key (The other button for saving private key saves it in different format. So use the method shown in the below image)

Image description

  • Save public key

Image description

Add Public key to Git server

  • Add key Public key to git (here I am using Bitbucket)

Image description

  • Copy the Repo SSH URL Image description

Configure Jenkins with Private key

  • Create Jenkins credential

Image description

  • Add username and Private key

Image description

  • Configure shared library with git SCM with the copied URL and credential we have just created

Image description

Top comments (0)