Support for password authentication was removed on August 13, 2021 에러 해결법

2021. 8. 17. 13:21개발/Git

원격 저장소에 commit 내역을 반영하려고 했더니 아래와 같은 에러가 발생했다. 

 

2021년 8월 13일부로 비밀번호를 통한 인증방식이 제거되었으니 Personal Access Token(PAT)를 사용해서 저장소에 접근하라고 한다. ( 구글링 해보니 2021년 8월 13일부터 계정 비밀번호를 통한 인증방식을 더이상 지원하지 않는다고 한다. ) 

 

자세한 사항은 아래 링크들을 참조.

 

Creating a personal access token - GitHub Docs

Personal access tokens (PATs) are an alternative to using passwords for authentication to GitHub when using the GitHub API or the command line. If you want to use a PAT to access resources owned by an organization that uses SAML SSO, you must authorize the

docs.github.com

 

Support for password authentication was removed. Please use a personal access token instead

I have this error on my console when I try to git pull: remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see h...

stackoverflow.com

문서에도 나와있지만 토큰은 패스워드처럼 관리하라고 한다.

 

 

원인을 알았으니 이제 인증문제를 해결해보자. 개인 계정 관리 화면에 가서 Developer settings를 클릭한다. 

 

Personal access tokens를 선택한다. 

 

Generate new token을 클릭하면 아래 화면이 뜨는데, 토큰에 각종 권한을 부여할 수 있다. 

 

토큰이 성공적으로 생성되면 PAT 토큰 값을 확인할 수 있다. 안내문구에서도 알수있듯이 다시 토큰값 조회하는게 불가능하기 때문에 반드시 어딘가에 복사하도록 하자.

 

git remote set-url origin https://<token>@github.com/<username>/<repo> 명령어를 통해 입력한 저장소 <repo>에 대한 권한을 획득할 수 있다. 

 

'개발 > Git' 카테고리의 다른 글

Git Bash를 이용한 git 기초 학습( branch와 merge )  (0) 2021.02.27