본문 바로가기
Dev, Settings

내 맥북에 Git 설정하기 : Setting git configuration on MacOS

by 조니 Johnny 2022. 9. 21.

이 포스트는 M1 Silicon MacOS, ZSH(ITerm) 기반으로 작성되었습니다.

 

Step 1. HomeBrew install

해당 링크에 들어가 커맨드를 통해 설치하다 보면 아래와 같은 warning 이 발생한다.

Warning: /opt/homebrew/bin is not in your PATH.
Instructions on how to configure your shell for Homebrew

말 그대로 이건 brew 명령어가 해당 PATH 가 없다는것이다.

 

 

echo 'export PATH=/opt/homebrew/bin:$PATH' >> ~/.zshrc

그렇다면 이 한줄에 명령어로 신세경(신세계)을 느끼면 된다.

zshrc가 수정된 후에는 꼭!! 터미널에 source ~/.zshrc 를 입력해서 반영을 해주셔야 합니다.

 

 

Step2. Git install 

brew command 를 통해서 git을 설치해주고 아무 project 나 clone 해보자.

 

어라라???

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.

fatal error와 함께 이런 내용이 담겨 있다.

아마 여러분은 Mac/키체인 접근/github 항목이 존재하지 않거나, username, password 를 통한 키체인이 등록되어있을 것이다.

 

remote: ** 내용을 읽어보면 예전(-2021.08) 인증 방식이라 더이상 지원하지 않는 방식이라고 설명해주는데. 그렇다면..

 

 

Step3. Generate Personal Authentication Token

 

(1) 을 눌러 필요한 권한을 넣고 생성한다.

(2) 생성된 token을 복사하여 키체인 암호에 넣어준다.

 

아래 첨부된 사진을 참고해 내 키체인도 업데이트 시켜주자.

 

 

Success!

댓글