📒SSH 연결하기 4줄 요약
1. SSH KEY를 만든다.
2. SSH Agent를 Background에 켠다.
3. SSH Private Key를 SSH-AGENT에 넣는다.
4. 생성된 SSH Public Key를 3rd Party(github)에 준다.
📒1. SSH 연결 확인하기
$ ls -a ~/.ssh
id_rsa와 id_rsa.pub 파일이 있다면 이미 생성되어 있는 것.
id_rsa는 private key, id_rsa.pub은 public key.
📒2. SSH KEY 만들기
$ ssh-keygen -t ed25519 -C "your_email@example.com"
📒3. SSH Agent를 Background에 켠다.
$ eval "$(ssh-agent -s)"
입력하면 Agent pid @@@@ 라고 나오는 것 확인.
📒4. SSH Private Key를 GITHUB에 등록한다.
$ clip < ~/.ssh/id_ed25519.pub
clip 명령어를 이용해 public key를 복사 한다음,
github -> Settings -> SSH and GPG Keys -> New SSH key -> Title 지정 후 복사한 public key를 붙여넣기.
컴퓨터와 Github이 안전하게 통신할 수 있게 되어따! 이제 로컬과 연결해보자!
📒5. Local의 Application과 연결하기
$ git init
$ git add .
$ git commit -m "commit"
$ git remote add origin https://github.com/devryyeong/boiler-plate.git
$ git push -u origin master
'Web > Basic (Back-end)' 카테고리의 다른 글
[#6] 비밀 설정 정보 관리 (0) | 2021.06.26 |
---|---|
[#5] Nodemon 설치 (0) | 2021.06.26 |
[#4] Body-parser & Postman (0) | 2021.06.26 |
[#2] MongoDB 연결, Model & Schema (0) | 2021.06.26 |
[#1] Node JS & Express JS로 Back-end 시작하기 (0) | 2021.06.23 |