728x90
반응형

github 에 repository remote 하고나서 push 하려고 했더니 다음과 같은 에러가 발생했다.

$ git push origin master
Logon failed, use ctrl+c to cancel basic credential prompt.
Username for 'https://github.com': jaynamm
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/jaynamm/devops-blog.git/'

에러 메시지 내용은 21년 8월 13일부터 패스워드 인증에 대한 지원이 사라졌다고 한다.
따라서 personal access token 으로 대신해 인증을 해야한다는 내용이었다.

그래서 토큰을 새로 발급받아 사용해야 한다.

토큰을 새로 발급 받는 방법은 github에서 문서로 제공해주고 있다.

https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token

 

Creating a personal access token - GitHub Docs

Note: If you use GitHub CLI to authenticate to GitHub on the command line, you can skip generating a personal access token and authenticate via the web browser instead. For more information about authenticating with GitHub CLI, see gh auth login. Personal

docs.github.com

만약 기존에 토큰을 만들어서 사용했다면 regenerate token 을 클릭해서 재발급해주면 된다.
그리고 로그인할 때 비밀번호 대신 토큰을 사용해서 로그인하면 된다.

$ git push origin master
Logon failed, use ctrl+c to cancel basic credential prompt.
Username for 'https://github.com': jaynamm
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 4 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (9/9), 1.11 KiB | 228.00 KiB/s, done.
Total 9 (delta 0), reused 0 (delta 0)
To https://github.com/jaynamm/devops-blog.git
 * [new branch]      master -> master

토큰을 입력해주었더니 이전과 같이 로그인에 성공했고 push 도 잘 된다.

 

- 참고 사이트 - 

https://miracleground.tistory.com/entry/GitHub-%ED%86%A0%ED%81%B0-%EC%9D%B8%EC%A6%9D-%EB%A1%9C%EA%B7%B8%EC%9D%B8-%ED%95%98%EA%B8%B0-%EC%98%A4%EB%A5%98-%ED%95%B4%EA%B2%B0-remote-Support-for-password-authentication-was-removed-on-August-13-2021-Please-use-a-personal-access-token-instead

 

GitHub 토큰 인증 로그인 하기 - [오류 해결]: remote: Support for password authentication was removed on August 13, 2

오늘 알고리즘 문제를 풀고 푸쉬를 하는데 이런 오류를 만났다. remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please se..

miracleground.tistory.com

 

728x90
반응형

'버전관리 > git & github' 카테고리의 다른 글

Gitflow 브랜치 전략 이해하기  (0) 2023.09.10
Github 프로필 README 꾸미기  (0) 2023.06.09
git 관련 사이트 메모  (0) 2019.08.31
git commit 하는 방법  (0) 2019.08.31
git 저장소 만들기  (0) 2019.08.31
복사했습니다!