기타

[Sourcetree] github 토큰 인증 로그인 방법 : sourcetree Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

코딩굼벵이 2021. 8. 19. 10:06
728x90

소스트리에서 push를 하려고 했더니 다음과 같은 에러가 떴다.

 

sourcetree Support for password authentication was removed on August 13, 2021. 
Please use a personal access token instead.


올해 8월 13일부터 소스트리의 인증 방식이 비밀번호에서 토큰 방식으로 바뀌었다고 한다.

그래서 위 에러가 뜨면 다음의 방식을 거치면 된다.

 

github 로그인 > 우측 상단 프로필 이미지 부분 드롭 메뉴에서 settings 선택

 

좌측 하단의 Developer Settings 선택

 

좌측의 Personal access tokens 클릭

 

 

우측의 Generate new token 클릭

 

 

토큰 생성의 목적을 쓰고, 토큰 만료일을 설정한 후 repo를 체크 후 가장 하단에 있는 Generate token을 클릭

 

생성된 해쉬값은 별도 조회가 가능하지 않은 것 같으므로 따로 저장해놓자.

 

그리고 소스트리로 가서 우측 상단의 설정을 누른다.

 

원격 > orgin 누르고 편집 클릭 > https://<token hash>@<github url>

 

아까 저장해둔 토큰 해쉬값과 인증하려는 깃허브 저장소의 주소를 넣고 확인을 누른다.

 

이제 push를 하면 정상적으로 작동할 것이다.

 

+) 22.10.20.

https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls

 

위 내용이 포함된 push 에러에도 똑같이 적용했더니 해결됐다.