Github Error : Authentication failed for ~ use a personal access token instead
1) Github Token Error 발생시 조치 방법
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/rlatjdgh9612/git_practice.git/'
터미널을 이용해서 파일(또는 프로젝트)을 push 하다가 git에 연동한 프로젝트나 파일/문서를 push 하려할때 다음과 같은 Error가 발생함.
해당 에러가 일어난 이유)
-> Github의 ID/Password 방식이 아닌 Developer Token을 이용하여 접근을 시도했기 때문이다.
해결 방법)
사진에 순서별로 설명을 상세하게 작성해두었습니다. 😊
🚨 Token 사용시 주의사항
1️⃣ Terminal(로컬)에 Github 계정과 연동하여 push 하는 방법
mac@seonghoui-MacBookPro git_practice % git remote -v
mac@seonghoui-MacBookPro git_practice % git remote add origin https://github.com/rlatjdgh9612/git_practice.git
mac@seonghoui-MacBookPro git_practice % git remote -v
origin https://github.com/rlatjdgh9612/git_practice.git (fetch)
origin https://github.com/rlatjdgh9612/git_practice.git (push)
mac@seonghoui-MacBookPro git_practice % git push origin main
2️⃣ Terminal(로컬)에 Git을 등록하는 방법 - (Github 계정과 연동됨)
Username for 'https://github.com': '아이디 계정'
Password for 'https://rlatjdgh9612@github.com': '복사한 토큰(token)'
3️⃣ Git 등록 및 push 이후 결과 값
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 8 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (9/9), 987 bytes | 987.00 KiB/s, done.
Total 9 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), done.
To https://github.com/rlatjdgh9612/git_practice.git
* [new branch] main -> main