프론트엔드 개발

[git 토큰 인증]remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. 본문

Front-End/git

[git 토큰 인증]remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

태나미 2021. 8. 14. 16:50
어느 때처럼 개발 후 git으로 github에 있는 repository에 push를 하려고 하였으나 아래와 같은 에러가 나타났다. 어느 사이트에서 좋은 자료가 있어, 내용을 공유하고자 한다.
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: unable to access 'https://github.com/[username]/[projectname].git/': The requested URL returned error: 403

GitHub에서 요구하는 acceess token 인증방식을 이용해보겠습니다.

 

1. GitHub.com 접속 및 로그인

: https://github.com/ 접속 후, 로그인을 한다

2. Profile -> Settings

우상단의 Profile 클릭후, Settings 클릭

3. Deveoper Settings

좌측의 Deveoper Settings 탭을 클릭.

4. Personal Access Tokens -> Generate New Token 

: 좌측의 Personal Access Tokens 탭을 누르고, Generate New Token 버튼 클릭!

5. 비밀번호 재입력

사용자 확인을 위해 비밀번호를 다시 한번 입력한다.

6. Access Token 생성

1) Note: 무슨 용도의 토큰인지 이름을 지어준다.

2) Select Scopes: 해당 토큰에 부여할 권한을 선택한다.

3) Generate Token: 토큰을 생성하는 버튼을 클릭해준다.

7. Personal Access Token 확인 및 복사

Access Token 생성 완료

8. Personal Access Token 적용

새롭게 clone 하는 프로젝트라면,

git clone https://<TOKEN>@github.com/<user_name>/<repo_name>.git

 

이미 clone 되어있는 프로젝트에 적용하려면 아래 명령어을 사용하면된다.

git remote set-url origin https://<TOKEN>@github.com/<user_name>/<repo_name>.git

* 주의 

이 토큰을 분실했거나 잊어버린 경우 다시 생성할 수 있지만 이 토큰을 사용하는 모든 것에 다시 생성된 토큰을 적용시켜야 합니다.

 

출처: https://curryyou.tistory.com/344 [카레유]

 

'Front-End > git' 카테고리의 다른 글

git branch 삭제  (0) 2022.08.30
[Git hooks] git commit시 branch name 자동반영  (0) 2022.04.13
remote repository 하위 항목 clone  (0) 2021.08.11
Comments