SourceTree로 저장소에 Push할 때 Repo 접근 인증 에러

Jaemin Kim·2023년 8월 16일

Error 및 해결

목록 보기
1/9
post-thumbnail

22-04-19에 github.io에서 작성

문제

SourceTree 상에서 내 Github Repository를 원격저장소로 추가한 뒤 Push할 때, 과거 입력한 username, password에 문제가 없음에도 에러가 발생

오류 메시지

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags --set-upstream origin main:main 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: Authentication failed for 'https://github.com/{user_name}/{repository_name}/

해결

기존 비밀번호 인증 지원방식은 더이상 지원되지 않고 앞으로 Github에서 personal access token을 발급받아 사용할 것.

  1. 깃허브 프로필 -> Settings -> Developer Settings -> Personal access tokens에서 발급할 수 있다. 권한은 repo만 주거나 repo, user에만 줘도 무관한 듯.
  2. 기존 Password방식을 사용했던 경우, C:\Users{사용자명}\AppData\Local\Atlassian\SourceTree 경로에 있는 passwd 파일을 삭제해주어야 한다.(기존 저장되어 있던 pw)

<복습>

  • 인증 지원 방식이 바뀌면서 생겼던 에러기 때문에 한동안 이 에러를 또 볼 일은 없겠지?라고 추측하고 있습니다. 아무튼 한번 겪었으니 다시 에러가 나도 당황하지는 않겠죠. 오류 메시지는 일단 읽고 검색해보자!라는 교훈을 톡톡히 느꼈던 에러였습니다.
profile
선생님..개발이 하고싶어요

0개의 댓글