SlideShare a Scribd company logo
LinuxDady.Com
On GitHub add ssh key step by step
for beginners
For more information visit
https://linuxdady.com
On GitHub add ssh key for
repository communication
BY DEEPAK KUMAR · PUBLISHED OCTOBER 28, 2019 · UPDATED OCTOBER 28, 2019
On GitHub add ssh key means to add our public key on GUI portal of GitHub
for communication without password. I think everyone knows about it there
are mainly two way to communicate with our repository on code management
server that is SSH or HTTP method.
But if we will not add ssh key then we have to give password every time for push
or pull our code in our public or private repository that’s become very hectic
task. So, to avoid this we have to add ssh key on GitHub GUI dashboard first.
GitHub add ssh key
I think everyone knows about use case of public and private key. So, we are
going to create public and private key for communication. I want to tell you that
we will add public key on GitHub, and we will use private key for
communication. Mind it there is no need to generate new private key for every
developer. We can use same private key for every developer just distribute that
key to new upcoming developers.
Because we know very well ssh key is not system based they are pair-based
means if you added public ssh key on GitHub then anyone can communicate
with your GitHub repository if he/she have private key. So, use below command
to create key pair.
1 ssh-keygen
Now go to below location and check our private and public key has been created
properly or not.
1
2
3
cd /root/.ssh/
ls
cat id_rsa.pub
[Click & Read:– What is git and basic terminology for DevOps
engineers]
[Click & Read:– Explain git workflow for beginners step by
step]
As we have checked our private and public key pair has been properly created.
Now Copy public key and paste it on GUI GitHub Portal as shown below.
Click on Add SSH key button. Then it will ask for password to confirm you are
the right or wrong person that are adding key.
Create Git repository and push
Our key has been added now come on the terminal and try to push code in repo.
In my case I am creating fresh git repo and will try to push that repo. Let’s do it.
1
2
3
4
5
6
mkdir git-repo
git init
ls -a
touch git-repo
echo hello > git-repo
git add .
Follow below steps only once those developers which are new and committing
first time. If you are not new ignore these steps.
1
2
git config --global user.email harry@gmail.com
git config --global user.name "harry"
After adding name and mail id developers can easily able to commit and push
their changes into repository.
1
2
3
git commit -m "This is harry first commit"
git remote add origin git@github.com:KaushikDeepakkumar/git-repo.git git
push origin master
But if we will not add ssh public key pair and will try to push then it will show
below error.
All about add ssh key on GitHub
Mind it we can also save our credential in a file a call them there is not need of
type username and password every time. But when safety is your priority then
go with ssh key. Then is more secure than passing credential. Still anyone have
query on topic GitHub add ssh key write me in comment box. I will try my best
to resolve them.
Interview question on GitHub add ssh key
1. Can all developers use same private and public key for GitHub
repository?
2. If anyone got our private key what he/she can do?
3. Explain the repository communication method?
4. Funny question interviewer often asks to devops engineer for to check
presence of mind — what is port number of GitHub? Please answer this
in comment box. Our team is waiting your answer.

More Related Content

What's hot

Git first contributions
Git first contributionsGit first contributions
Git first contributions
Yogendra Sharma
 
Gerrit Code Review: how to script a plugin with Scala and Groovy
Gerrit Code Review: how to script a plugin with Scala and GroovyGerrit Code Review: how to script a plugin with Scala and Groovy
Gerrit Code Review: how to script a plugin with Scala and Groovy
Luca Milanesio
 
Openstack contribution process
Openstack contribution processOpenstack contribution process
Openstack contribution processSyed Armani
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
Wycliff1
 
GitBlit plugin for Gerrit Code Review
GitBlit plugin for Gerrit Code ReviewGitBlit plugin for Gerrit Code Review
GitBlit plugin for Gerrit Code Review
Luca Milanesio
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and github
Aderemi Dadepo
 
Using the GitHub App to Connect to Bitbucket
Using the GitHub App to Connect to BitbucketUsing the GitHub App to Connect to Bitbucket
Using the GitHub App to Connect to Bitbucket
Liam Dempsey
 
Getting started With GIT
Getting started With GITGetting started With GIT
Getting started With GIT
GhadiAlGhosh
 
GerritHub.io - present, past, future
GerritHub.io - present, past, futureGerritHub.io - present, past, future
GerritHub.io - present, past, future
Luca Milanesio
 
Git, github and the hacktober fest
Git, github and the hacktober festGit, github and the hacktober fest
Git, github and the hacktober fest
UtkarshRaj83
 
Contributing to Open Source #Hacktoberfest
Contributing to Open Source #HacktoberfestContributing to Open Source #Hacktoberfest
Contributing to Open Source #Hacktoberfest
Cheah Eng Soon
 
Visual Studio 2013 Update 4 Introduction
Visual Studio 2013 Update 4 IntroductionVisual Studio 2013 Update 4 Introduction
Visual Studio 2013 Update 4 Introduction
Warren Thompson
 
SFScon17 - Daniele Gobbetti: "Free software projects on GitHub and DMCA"
SFScon17 - Daniele Gobbetti: "Free software projects on GitHub and DMCA"SFScon17 - Daniele Gobbetti: "Free software projects on GitHub and DMCA"
SFScon17 - Daniele Gobbetti: "Free software projects on GitHub and DMCA"
South Tyrol Free Software Conference
 
Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010
Matt Gauger
 
Git 's way
Git 's wayGit 's way
Git 's way
MUNA abdimuna
 
Distributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component worldDistributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component world
Rachael L Moore
 
Introduction to GitHub
Introduction to GitHubIntroduction to GitHub
Introduction to GitHub
Nishan Bose
 
Webinar: Arbeiten mit Git und GitHub
Webinar: Arbeiten mit Git und GitHubWebinar: Arbeiten mit Git und GitHub
Webinar: Arbeiten mit Git und GitHub
wasmitweb GmbH
 

What's hot (19)

Git first contributions
Git first contributionsGit first contributions
Git first contributions
 
Github tutorial1
Github tutorial1Github tutorial1
Github tutorial1
 
Gerrit Code Review: how to script a plugin with Scala and Groovy
Gerrit Code Review: how to script a plugin with Scala and GroovyGerrit Code Review: how to script a plugin with Scala and Groovy
Gerrit Code Review: how to script a plugin with Scala and Groovy
 
Openstack contribution process
Openstack contribution processOpenstack contribution process
Openstack contribution process
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
 
GitBlit plugin for Gerrit Code Review
GitBlit plugin for Gerrit Code ReviewGitBlit plugin for Gerrit Code Review
GitBlit plugin for Gerrit Code Review
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and github
 
Using the GitHub App to Connect to Bitbucket
Using the GitHub App to Connect to BitbucketUsing the GitHub App to Connect to Bitbucket
Using the GitHub App to Connect to Bitbucket
 
Getting started With GIT
Getting started With GITGetting started With GIT
Getting started With GIT
 
GerritHub.io - present, past, future
GerritHub.io - present, past, futureGerritHub.io - present, past, future
GerritHub.io - present, past, future
 
Git, github and the hacktober fest
Git, github and the hacktober festGit, github and the hacktober fest
Git, github and the hacktober fest
 
Contributing to Open Source #Hacktoberfest
Contributing to Open Source #HacktoberfestContributing to Open Source #Hacktoberfest
Contributing to Open Source #Hacktoberfest
 
Visual Studio 2013 Update 4 Introduction
Visual Studio 2013 Update 4 IntroductionVisual Studio 2013 Update 4 Introduction
Visual Studio 2013 Update 4 Introduction
 
SFScon17 - Daniele Gobbetti: "Free software projects on GitHub and DMCA"
SFScon17 - Daniele Gobbetti: "Free software projects on GitHub and DMCA"SFScon17 - Daniele Gobbetti: "Free software projects on GitHub and DMCA"
SFScon17 - Daniele Gobbetti: "Free software projects on GitHub and DMCA"
 
Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010
 
Git 's way
Git 's wayGit 's way
Git 's way
 
Distributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component worldDistributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component world
 
Introduction to GitHub
Introduction to GitHubIntroduction to GitHub
Introduction to GitHub
 
Webinar: Arbeiten mit Git und GitHub
Webinar: Arbeiten mit Git und GitHubWebinar: Arbeiten mit Git und GitHub
Webinar: Arbeiten mit Git und GitHub
 

Similar to Github add ssh key

Setting up github and ssh keys.ppt
Setting up github and ssh keys.pptSetting up github and ssh keys.ppt
Setting up github and ssh keys.ppt
Lovely Professional University
 
Hello Git
Hello GitHello Git
Hello Git
bsadd
 
Hello, Git!
Hello, Git!Hello, Git!
introductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdfintroductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdf
BruceLee275640
 
GIT By Sivakrishna
GIT By SivakrishnaGIT By Sivakrishna
GIT By Sivakrishna
Nyros Technologies
 
Git and Github.pptx
Git and Github.pptxGit and Github.pptx
Git and Github.pptx
Hitesh670643
 
Git ongithub
Git ongithubGit ongithub
Git ongithub
Almeda Asuncion
 
Github developing stack
Github developing stackGithub developing stack
Github developing stack
Vicente Bolea
 
Github github-github
Github github-githubGithub github-github
Github github-githubfusion2011
 
Git/GitHub
Git/GitHubGit/GitHub
Git/GitHub
Cindy Royal
 
Git best practices 2016
Git best practices 2016Git best practices 2016
Git best practices 2016
Otto Kekäläinen
 
Git Mastery
Git MasteryGit Mastery
Git Mastery
ShehryarSH1
 
GWT Contributor Workshop
GWT Contributor WorkshopGWT Contributor Workshop
GWT Contributor Workshop
Manuel Carrasco Moñino
 
Intro to Git for Drupal 7
Intro to Git for Drupal 7Intro to Git for Drupal 7
Intro to Git for Drupal 7
Chris Caple
 
Introduction to Git (even for non-developers!)
Introduction to Git (even for non-developers!)Introduction to Git (even for non-developers!)
Introduction to Git (even for non-developers!)
John Anderson
 
Git hub visualstudiocode
Git hub visualstudiocodeGit hub visualstudiocode
Git hub visualstudiocode
Rolands Krumbergs
 
Git for a newbie
Git for a newbieGit for a newbie
Git for a newbie
Anuj Sharma
 

Similar to Github add ssh key (20)

Setting up github and ssh keys.ppt
Setting up github and ssh keys.pptSetting up github and ssh keys.ppt
Setting up github and ssh keys.ppt
 
Hello Git
Hello GitHello Git
Hello Git
 
Hello, Git!
Hello, Git!Hello, Git!
Hello, Git!
 
introductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdfintroductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdf
 
GIT By Sivakrishna
GIT By SivakrishnaGIT By Sivakrishna
GIT By Sivakrishna
 
Git Hub Platform
Git Hub PlatformGit Hub Platform
Git Hub Platform
 
Git and Github.pptx
Git and Github.pptxGit and Github.pptx
Git and Github.pptx
 
Git ongithub
Git ongithubGit ongithub
Git ongithub
 
Github developing stack
Github developing stackGithub developing stack
Github developing stack
 
Github github-github
Github github-githubGithub github-github
Github github-github
 
Git/GitHub
Git/GitHubGit/GitHub
Git/GitHub
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Git best practices 2016
Git best practices 2016Git best practices 2016
Git best practices 2016
 
Git Mastery
Git MasteryGit Mastery
Git Mastery
 
GWT Contributor Workshop
GWT Contributor WorkshopGWT Contributor Workshop
GWT Contributor Workshop
 
Intro to Git for Drupal 7
Intro to Git for Drupal 7Intro to Git for Drupal 7
Intro to Git for Drupal 7
 
Introduction to Git (even for non-developers!)
Introduction to Git (even for non-developers!)Introduction to Git (even for non-developers!)
Introduction to Git (even for non-developers!)
 
Git hub visualstudiocode
Git hub visualstudiocodeGit hub visualstudiocode
Git hub visualstudiocode
 
16 Git
16 Git16 Git
16 Git
 
Git for a newbie
Git for a newbieGit for a newbie
Git for a newbie
 

Recently uploaded

Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 

Recently uploaded (20)

Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 

Github add ssh key

  • 1. LinuxDady.Com On GitHub add ssh key step by step for beginners For more information visit https://linuxdady.com
  • 2. On GitHub add ssh key for repository communication BY DEEPAK KUMAR · PUBLISHED OCTOBER 28, 2019 · UPDATED OCTOBER 28, 2019 On GitHub add ssh key means to add our public key on GUI portal of GitHub for communication without password. I think everyone knows about it there are mainly two way to communicate with our repository on code management server that is SSH or HTTP method. But if we will not add ssh key then we have to give password every time for push or pull our code in our public or private repository that’s become very hectic task. So, to avoid this we have to add ssh key on GitHub GUI dashboard first. GitHub add ssh key I think everyone knows about use case of public and private key. So, we are going to create public and private key for communication. I want to tell you that we will add public key on GitHub, and we will use private key for communication. Mind it there is no need to generate new private key for every developer. We can use same private key for every developer just distribute that key to new upcoming developers. Because we know very well ssh key is not system based they are pair-based means if you added public ssh key on GitHub then anyone can communicate
  • 3. with your GitHub repository if he/she have private key. So, use below command to create key pair. 1 ssh-keygen Now go to below location and check our private and public key has been created properly or not. 1 2 3 cd /root/.ssh/ ls cat id_rsa.pub [Click & Read:– What is git and basic terminology for DevOps engineers] [Click & Read:– Explain git workflow for beginners step by step]
  • 4. As we have checked our private and public key pair has been properly created. Now Copy public key and paste it on GUI GitHub Portal as shown below. Click on Add SSH key button. Then it will ask for password to confirm you are the right or wrong person that are adding key.
  • 5. Create Git repository and push Our key has been added now come on the terminal and try to push code in repo. In my case I am creating fresh git repo and will try to push that repo. Let’s do it. 1 2 3 4 5 6 mkdir git-repo git init ls -a touch git-repo echo hello > git-repo git add . Follow below steps only once those developers which are new and committing first time. If you are not new ignore these steps. 1 2 git config --global user.email harry@gmail.com git config --global user.name "harry" After adding name and mail id developers can easily able to commit and push their changes into repository. 1 2 3 git commit -m "This is harry first commit" git remote add origin git@github.com:KaushikDeepakkumar/git-repo.git git push origin master But if we will not add ssh public key pair and will try to push then it will show below error.
  • 6. All about add ssh key on GitHub Mind it we can also save our credential in a file a call them there is not need of type username and password every time. But when safety is your priority then go with ssh key. Then is more secure than passing credential. Still anyone have query on topic GitHub add ssh key write me in comment box. I will try my best to resolve them. Interview question on GitHub add ssh key 1. Can all developers use same private and public key for GitHub repository? 2. If anyone got our private key what he/she can do? 3. Explain the repository communication method? 4. Funny question interviewer often asks to devops engineer for to check presence of mind — what is port number of GitHub? Please answer this in comment box. Our team is waiting your answer.