문제발생
Linux에서 Github를 사용하다 아래와 같은 에러가 발생하였다.
원인
해당 오류는 2021년 8월 이후로 git pull을 진행할 때 ID/Password 방식이 아닌
token을 이용하여 로그인을 하기 때문에 발생한다.
즉, password가 아닌 token값을 입력해야 한다.
해결방법
0. Github에 로그인한다.
GitHub: Let’s build from here
GitHub is where over 100 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and fea...
github.com
1. 우측 상단에서 Settings을 선택한다.
2. Settings 페이지에서 좌측 하단 Developer setting을 선택한다.
3. Personal access tokens을 선택 후 Generate new token을 클릭한다.
4. 생성할 토큰 정보를 입력한다.
- Note : 설명/사용처 등을 입력한다.
- Expiration : 원하는 사용 기간을 선택한다.
이후 repo를 선택 후 Generate token을 클릭한다.
5. 토큰이 생성된다.
단 한번만 나타나므로, 반드시 복사해서 따로 저장해야 한다.
6. Git 등록
$ git config --global user.name "아이디"
$ git config --global user.password '복사한 토큰'
정상적으로 git pull이 진행되었다.
'DevOps > Git & Github' 카테고리의 다른 글
[Git] ! [rejected] master -> master (fetch first) 에러 (git push 에러) (0) | 2023.03.08 |
---|---|
[Git] Unity 대용량 프로젝트 push (Git lfs) (0) | 2023.03.07 |
[Git] fatal: couldn’t remote ref master 에러 (0) | 2023.03.06 |
[Git] failed to push some refs to ... 에러 (0) | 2023.03.06 |
[Git] Git과 Github (0) | 2023.03.06 |