모든 명령어는 terminal(터미널)을 사용하면 된다.
윈도우는 gitbash 쓰면 되는 것으로 알고 있다.
나는 MAC 사용 중!
1. SSH 공개키가 있는지 확인한다.
ls -al ~/.ssh
id_rsa.pub가 있으면 공개키가 있다는 것!
2. 공개키가 있을 경우
MAC인 경우 cat ~/.ssh/id_rsa.pub
Window인 경우 cat id_rsa.pub
명령어를 치고 나면 ssh-rsa ~~~~~~~ .local이라고 나오는 부분이 공개키가 되는 것이다.
3. 공개키가 없을 경우
ssh-keygen
Enter file in which to save the key: 엔터
Enter passphrase (empty for no passphrase): 엔터
Enter same passphrase again: 엔터
공개키 생성된 후 2. 공개키가 있을 경우 를 따라하면된다.
4. 공개키가 있는데 새로운 공개키를 발급해야 하는 경우
ssh-keygen
Enter file in which to save the key: 엔터
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase): 엔터
Enter same passphrase again: 엔터
공개키 생성된 후 2. 공개키가 있을 경우 를 따라하면 된다.
728x90
'Tool > Git' 카테고리의 다른 글
git clone 에러 fatal: multiple updates for ref 'refs/remotes/origin/main' not allowed (0) | 2024.05.13 |
---|