실습환경: AWS EC2 ubuntu 22.04
git 설치는 공식 사이트 참고: https://git-scm.com/download/linux
Git
Download for Linux and Unix It is easiest to install Git on Linux using the preferred package manager of your Linux distribution. If you prefer to build from source, you can find tarballs on kernel.org. The latest version is 2.39.1. Debian/Ubuntu For the l
git-scm.com
ssh로 git clone -> rsa key 등록: 아래 링크 참조
https://taltal-dev-note.tistory.com/62
Github ssh 키등록
Github ssh 키 등록 ssh-key 생성 $ ssh-keygen -t rsa $ ssh-keygen -t -b 4096 -C "Email Address" 보통은 첫번쨰로 바로 하는데 아래 -b 4096 옵션과 -C comment 옵션을 쓸 수 있습니다. -b 4096은 ssh key를 4096 bits로 생성하는
taltal-dev-note.tistory.com
원하는 곳에 directory 생성하고 git clone을 합니다
저의 경우는 ~/git 폴더를 생성하고 이 안에 SSH로 git clone을 하려고 합니다.
ubuntu@ip-172-31-45-169:~/git$ git clone git@github.com:Junanjunan/taltalrealty3.1.git
Cloning into 'taltalrealty3.1'...
git@github.com: Permission denied (publickey).
ssh키를 등록했는데도 Permission denied(publickey)가 나옵니다.
.ssh에 config를 작성해주면 됩니다. (https://taltal-dev-note.tistory.com/63 참고)
Host github.com
HostName github.com
User Junanjunan
IdentityFile ~/.ssh/id_rsa
이렇게 해주고 SSH로 git clone을 해줍니다.
'AWS > EC2' 카테고리의 다른 글
EC2: PostgreSQL remote connect (0) | 2023.02.03 |
---|---|
AWS EC2 Ubuntu GUI (0) | 2023.02.01 |
EC2 시작하기 # ubuntu (0) | 2023.01.31 |