-
[Git] Authentication failed 문제. (git Token)Programming (Others)/각종 에러 해결 일지 2022. 1. 26. 23:03
시험도 끝났고... 이제 슬슬 BoJ도 풀어 올릴 겸 오랜만에 깃 레포지토리를 정리하러 들어갔더니 권한 부족으로 push가 되지 않았다. 알고 봤더니 내가 git을 하지 않는 동안에, git의 인증 방식이 변한 듯 했다.
(기존 git 인증 방식은 github의 id와 비밀번호를 입력하기만 하면 끝이었다.)
https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/
Token authentication requirements for Git operations | The GitHub Blog
Beginning August 13th, 2021, we will no longer accept account passwords when authenticating Git operations on GitHub.com.
github.blog
난 영어로 된 글을 읽으면 머리가 지끈지끈한 병을 앓고 있기에(...) 최대한 필요한 내용만 정말 대충 읽어 본 결과..
이러한 기존 방식이 보안 등에서 문제가 되었던 듯? 그래서 Token이라는 새로운 방식을 도입했다고 한다.
API에서 key 발급받듯 github에서 token을 발급 받아, password 입력 창에 대신 넣어주면 된다.
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
이 링크에서 personal token을 발급 받는 방법을 상세히 알려 주고 있다.
expiration date도 설정 해야 하는데, no expiration으로 할 수도 있으나 권장하지 않는다고 함. 그래서 난 90일로 했다.
여담으로, 토큰은 계정 비밀번호와는 다른 개념이라, 한 번 key를 입력하면 소멸되는 듯 하다. (당연하지..)
즉, 동일한 컴퓨터에서라도 운영 체제가 다르다면 토큰을 두 번 발급받아야 한다.
이런 이유로 나도 Linux에서 한 번, Windows에서 한 번 토큰을 발급받았다.
주황색 박스 친 건 그냥 모자이크 한 거임 모두 모두 토큰 발급 받고 무사히 깃 푸시하고 행복한 코딩생활 하자~~~~!!!!
'Programming (Others) > 각종 에러 해결 일지' 카테고리의 다른 글
[Anaconda] tensorflow 사용 중 만난 세 가지 에러 (0) 2022.01.26 pip이 있었는데요, 없었습니다 (pip 새로 설치) (0) 2022.01.26 [linux/ubuntu] mecab-ko-dic을 설치하기 위해 고군분투한 일(..) (0) 2021.05.29 [Anaconda] Ubuntu/Linux 환경에서 아나콘다 환경 변수 설정 (0) 2021.05.21 [python] Jupyter Notebook에 anaconda 가상 환경 연결하기 (0) 2021.04.04