DevOps session 13: Automate git SETUP using bash scripting.

SSH is used to connect with remote systems and share the data safely, securely.
Advantages of using SSH Authentication:
1. Every time we need to provide the user and password when we are pushing the code from local to GitHub repo. To avoid this we can use SSH for authenticating directly and pushing the code.
2. Because we are not providing login credentials every time. We can save lots of time.
3. It is secure way to connect with local and central repo while transferring data.
Follow the below steps to setup SSH and connect your local repo ,central repo securely.
1. Open ubuntu terminal, and pass below command to generate key.
cmd: ssh-keygen -o -t rsa -C "test@example.com"
Then press enter 3 times, you can see a screen as below.
cmd 1: cd ~/.ssh
cmd 2: ls -a
cmd 3: cat id_rsa.pub
Copy the key from the console.
4. Once logged in to your GitHub account, Go to settings and the find SSH and GPG keys. Then
6. To verifying if the SSH is configured properly, we need to check the sample repo we created and then click SSH tab, to confirm if SSH is successful. No error should be displayed and a link will be shown to access the sample repo.
7. Now we are ready to login into our GitHub repo using SSH authentication.
you can use the SSH link from STEP 6 and clone using SSH now. Command provided below.
Comments
Post a Comment