Git push에러 해결법

재피터노트북·2022년 8월 28일
1

오랜만에 깃허브에 push를 할려고 하니깐 에러가 나왔다.

Username for 'https://github.com': Sun1203
Password for 'https://Sun1203@github.com':
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/Sun1203/-Bucket-list.git/'

이는 8월부터 id/password 방식이 아닌 토큰을 이용하기 때문에 발생한다.

해결법

1. 깃허브 사이트에 접속한다.깃허브
2. 우측 상단의 정보에서 settings 클릭

3. setting 페이지 좌측하단의 Developer setting 클릭

4. personal tokens 클릭후 genrate new token 클릭

5. Note에 원하는 사용처 입력후 expiration에 원하는 기간을 입력한뒤 repo 클릭후 생성

6. 토큰이 생성되면 복사!!(한번만 보여짐)
7. 터미널에 등록

git config --global user.password "복사한 토큰"

8. git push할때 password란에 복사한 토큰입력


9. push 성공!

profile
난 이 재 선

0개의 댓글