Hyeyeon blog

Git pull, push 오류 해결 - remote: Support for password authentication was removed 본문

개발/etc

Git pull, push 오류 해결 - remote: Support for password authentication was removed

Hyeyeon.P 2023. 1. 28. 01:00
반응형

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/...'


git pull 혹은 git push 명령어 실행 시 Username, Password로 인증할 경우 위와 같은 오류가 발생한다.

2021년 8월 13일부터 Password 인증이 지원되지 않아 아래 링크의 안내에 따라 토큰을 생성해서 인증해야한다. 

access token을 만든 후 Password 입력 란에 token을 입력하면 된다.

Guthub access token 만들기 

 

1.  Git access token 생성: 

Git 우측 프로필 사진 클릭 > Settings > Developer Settings > Personal access tokens > Generate new token

2. 생성한 access token을 Password 입력란에 입력 

 

‼️ 참고1. 일반적인 기능(git pull, push 등)을 사용할 경우, Select scopes 항목 중 repo, admin:org, gist선택하면 충분하다.

‼️ 참고2. 프로젝트에 이미 git이 연결된 경우, 아래와 같이 remote url을 변경해주어야 한다. 

변경하지 않으면 git pull, git push 시 Username, Password 입력 화면이 뜬다. 

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