본문 바로가기
개발/git

github 패스워드 인증 오류

by hyperhand 2025. 3. 6.
반응형

작년에 작업했던 소스 코드를 수정해서 다시 push 해야할 일이 생겼다.

작업 다 마치고 push만 하면 되는데 다음과 같은 오류가 발생했다.

$ git push all master
fatal: cannot run /tmp/.mount_cursor4j9nYi/resources/app/extensions/git/dist/askpass.sh: 그런 파일이나 디렉터리가 없습니다
Username for 'https://github.com': myusername
fatal: cannot run /tmp/.mount_cursor4j9nYi/resources/app/extensions/git/dist/askpass.sh: 그런 파일이나 디렉터리가 없습니다
Password for 'https://myusername@github.com': mypassword
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: https://github.com/MyAccount/MyRepo.git/에 대한 인증이 실패하였습니다

 

메시지는 패스워드 인증 방식은 2021년 8월 13일부로 더 이상 지원하지 않는다는 내용이다. 이상한 건 작년까지도 문제없이 push가 가능했는데 왜 갑자기 이런 오류가 뜨는지 모르겠다.

 

안내된 링크에서는 해결책을 찾지 못해서 구글링 결과 이곳을 참조해 해결할 수 있었다.

 

해결 방법

1. github 좌상단 프로필 메뉴에서 settings 클릭

github 프로필 메뉴

 

2. 왼쪽 메뉴에서 맨 아래쪽 Developer settings 클릭

Developer settings 메뉴

 

3. 왼쪽 메뉴에서 Personal access tokens - Tokens (classic) 클릭

Personal access tokens 메뉴

 

4. Generate new token - Generate new token (classic) 클릭

Generate new token - Generate new token (classic) 메뉴

 

5. note는 임의대로 입력하고, 허용할 scope들도 선택해준다. 나는 그냥 다 선택했다.

note, scope 설정

 

6. 맨 아래 Generate token 버튼 클릭

 

7. 그럼 token 생성 완료

토큰 생성 완료

 

8. 이젠 push 할 때 password 입력시 비밀번호가 아닌 토큰을 입력하면 정상적으로 수행된다.

 

 

반응형