2021년 8월 13일부터 GitHub에서
기존 ID/PW기반의 Basic Authentication 인증 방식을 지원하지 않고,
ID/Personal Access Token 방식의 Token Authentication 인증이 필수가 됩니다.
소스코드를 push 하려고 하면 이런 에러를 볼 수 있을 것입니다.
Password authentication is temporarily disabled as part of a brownout. Please use a personal access token instead.
Please see https://github.blog/2020-07-30-token-authentication-requirements-for-api-and-git-operations/ for more information.
해결법 1.
1. Personal Access Token을 생성합니다.
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
Github.com 접속 / 로그인
Profile -> Settings -> Developer settings -> Personal access tokens -> Generate New Token
Access Token 생성
1) Note : 토큰의 이름/용도
2) Select Scopes : 해당 토큰에 부여할 권한 선택
3) Generate Token : 토큰 생성
생성된 토큰 값을 확인하고 복사해두세요!!
** 최초 생성 이후 이 토큰 값에 다시 접근할 수 없기 때문에 즉시 복사해 안전한 곳에 저장해두세요!! **
2. remote url 업데이트
git remote set-url origin https://[token]@github.com/[git_url].git
(예시 : git remote set-url origin https://[토큰값]@github.com/ysu96/repo.git )
3. git pull
git pull https://[token]@github.com/[git_url].git
이후 정상적으로 push 가능합니다.
해결법 2.
해결법 1에서 생성한 토큰 값을 복사하고
push 작업 수행 시 비밀번호 입력할 때 Personal Access Token 입력하면 됩니다.