Skip to content

Commit 114d644

Browse files
authored
Create SSH_GITHUB
1 parent eb7a19b commit 114d644

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

GIT/SSH_GITHUB

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Go to any AWS instance
2+
# sudo su -
3+
# pwd ==> should be root
4+
5+
Generate the ssh key as mentioned below:
6+
https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
7+
8+
# ssh-keygen
9+
# cd /root/.ssh ==> 2 files should be there id_rsa & id_rsa.pub
10+
# eval "$(ssh-agent -s)" ===> start the ssh-agent in the background
11+
# ssh-add ~/.ssh/id_rsa ====> Add your SSH private key to the ssh-agent
12+
# cat id_rsa.pub =====> Copy the ssh public key to github
13+
# Go to github ==> Settings
14+
# go to SSH section on left side
15+
# Click on Add new ssh key
16+
# give a name as developer1
17+
# paste the copies ssh public key from EC2-instance
18+
# go back to ec2-instance
19+
# cd
20+
# git clone [email protected]:Sonal0409/myproject05Aug.git
21+
# successfully able to clone , push to github without authentication.
22+
23+

0 commit comments

Comments
 (0)