맥북에서 token 생성, 저장하기 (github password 오류 발생시)

정혜인·2023년 3월 3일
0

github

목록 보기
1/3
post-thumbnail

🤬 문제 발생

맥북으로 바꾼 뒤 git clone을 하려는데, username과 password를 입력했는데 아래 사진과 같이 오류가 계속 발생하였다.

😱 오류 메시지

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: Authentication failed for 'https://github.com/happyhyep/BHC_project_frontend.git/'


😱 문제 원인

GitHub에서 2021년부터 기존 터미널 상에서 아이디와 비밀번호만으로 push를 사용할 수 있었던 방법을 보안 때문에 막아버렸기 때문이다. 전에 사용하던 노트북 (윈도우)에서는 설정을 해 두어 상관 없었지만, 새로 산 맥북에는 설정이 안 되어 있어 다시 설정을 해야하는 상황이다.


🧐 해결 방법

① 토큰 생성

내 프로필 > settings(설정) > Developer settings (맨 아래) > Personal access tokens > Tokens

토큰 생성 후 복사

② mac에 토큰 저장

command + 스페이스바 눌러서 키체인 접근 들어가기

github 검색 후 [github.com](http://github.com) 더블 클릭

암호 보기 클릭 후 팝업창에 맥 암호 입력

암호 보기 창이 활성화되면, 복사해둔 토큰 입력

변경사항 저장

0개의 댓글