github ssh 설정하기
2021-11-18
.
Data_Engineering_TIL(20211118)
$ git config --global user.name minman
$ git config --global user.email minman@google.com
$ ssh-keygen -t ed25519 -C "minman@google.com"
$ ll
total 56
...
-rw------- 1 minman minman\Domain Users 464B 11 18 13:57 id_ed25519
-rw-r--r-- 1 minman minman\Domain Users 111B 11 18 13:57 id_ed25519.pub
$ pbcopy < ~/.ssh/id_ed25519.pub
# 그런 다음에 깃허브 웹콘솔로 접속해서 바로 위에 명령어로 복사한 키를 SSH and GPG keys 메뉴에 들어가서 SSH key를 등록
# 아래와 같이 ssh config를 작성후 저장
$ vim ~/.ssh/config
Host github.com
IdentityFile /Users/minman/.ssh/id_ed25519
User git
$ ssh -T git@github.com
Enter passphrase for key '/Users/minman/.ssh/id_ed25519':
Hi minman! You have successfully authenticated, but GitHub does not provide shell access.
$ cd my_work
# 주의해야 할 점은 클론뜰때 SSH용 주소로 떠와야 함
$ git clone git@github.com:minman2115/Data_engineering_studynotes_2021.git
Cloning into 'Data_engineering_studynotes_2021'...
Enter passphrase for key '/Users/minman/.ssh/id_ed25519':
...
Updating files: 100% (12313/12313), done.