(1) Register SSH key
Author : @최규원
Update: 2021.05.10
Create a new SSH key on your local PC
Register a SSH key is necessary to access Git via your local terminal.
This tutorial will show how to create a ssh key and register it on github.
- First, you have to check whether ssh key is already existed.
- Follow the commands below to check ssh key existence.
$ cd ./ssh
$ ls
If you haven't made any, it will say 'No such file or directory' and command '$ ls' shows that there's no directory for ssh.
- Create a new SSH key
$ ssh-keygen -t rsa -C "your_id@your_email_host.com"
⚠️You have write your email address that is used when you create your github account!!⚠️
- Just put ENTER when it asks passphrase! Not to set password is way easier to use~
- I put blank (ENTER) for password!
Check your SSH key
$ cat ~/.ssh/id_rsa.pub
You will see a ssh key that starts with 'ssh-rsa' and ends with your email address.
Copy it from 'ssh-rsa ........' to the end (your email address).
Register it on Github!
- Go to 'settings' (click your right top icon)
- Click 'SSH and GPG keys'
- Click 'New SSH key'
- Type whatever you want on title and paste the ssh key and register!
Check whether you did right
Follow the commands below to check!
$ ssh -T git@github.com
If you see this :
Just type yes
Congratulations!
Now you can push and pull your codes on github via terminal! 😉
728x90