From 7cbf039097418d8e8d72f5f3d6251c0afd87fec9 Mon Sep 17 00:00:00 2001 From: Thirumal Date: Wed, 11 Sep 2024 17:04:13 +0530 Subject: [PATCH] Added jenkins details --- jenkin/credentials.md | 33 +++++++++++++++++++++++++++++++++ jenkin/jenkins.md | 12 +++++++----- 2 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 jenkin/credentials.md diff --git a/jenkin/credentials.md b/jenkin/credentials.md new file mode 100644 index 0000000..6d08579 --- /dev/null +++ b/jenkin/credentials.md @@ -0,0 +1,33 @@ +# Credentials + +## SSH + +Switch to the jenkins user: + +```bash + +sudo su - jenkins +``` + +Generate the SSH key (if not already created): + +```bash + +ssh-keygen -t rsa -b 4096 -C "your_email@example.com" + +``` + +Save the key in the default location (`/var/lib/jenkins/.ssh/id_rsa`) and provide a passphrase if needed. + +Copy the SSH public key to GitHub: + +``` +cat ~/.ssh/id_rsa.pub +``` + +Copy the content of the public key and add it to GitHub under Settings > SSH and GPG keys > New SSH Key. + + +Go to jenkins, and add the `Private` key to credentials + +!> Need to add known host. If you don't know, how to just clone any repo, it will prompt yes/No. Press `YES` diff --git a/jenkin/jenkins.md b/jenkin/jenkins.md index 1d4a3db..dbe8312 100644 --- a/jenkin/jenkins.md +++ b/jenkin/jenkins.md @@ -1,6 +1,8 @@ # Jenkins - * [Install Jenkin](jenkin/installation.md) - * [Config with Private IP](jenkin/config_with_private_ip.md) - * [Email Integration/notification](jenkin/Email%20Integration.md) - * [Install jenkin on docker](jenkin/jenkin_on_docker.md) - * [Troubleshoot](jenkin/Troubleshoot.md) + +* [Install Jenkin](jenkin/installation.md) +* [Config with Private IP](jenkin/config_with_private_ip.md) +* [Email Integration/notification](jenkin/Email%20Integration.md) +* [Credentials](jenkins/credentials.md) +* [Install jenkin on docker](jenkin/jenkin_on_docker.md) +* [Troubleshoot](jenkin/Troubleshoot.md)