본문 바로가기
컴퓨터

[에러해결] 깃헙 토큰 받고 push하는 법 정리 - remote: Password authentication is temporarily disabled as part of a brownout. Please use a personal access token instead.

by 우유식빵 2021. 7. 1.

오류와 해결

깃허브에 커밋하고 푸쉬하려했더니

remote: Password authentication is temporarily disabled as part of a brownout. Please use a personal access token instead.
remote: Please see https://github.blog/2020-07-30-token-authentication-requirements-for-api-and-git-operations/ for more information.
fatal: unable to access 'https://github.com/ellynhan/algorithm.git/': The requested URL returned error: 403

위와 같은 에러 메세지가 떴다

가리기 귀찮으니까 그냥 깃허브는 시원하게 공개하자.. 개인정보.. 잘가

 

보니까 토큰이 필요한 모양이다.

github.com에 들어가서 토큰을 만들어주자.

 

1. Settings에 들어간다.

Settings들어가기

2.  Developer Settings에 들어간다.

Developer Settings들어가기

3. Personal access tokens에 들어간다. 

들어가서 generate new token을 해준다. 

 

4. New Token Setting

새 토큰 설정해주기

새토큰 이름 아무거나 지어주고 대충 밑에 체크박스로 이 토큰으로 접근할 수 있는 영역 범위를 설정해준다.

 

5. Update token

완료하고 update token을 눌러주면 된다.

 

그 후로 이 토큰을 가지고 푸쉬를 하면 되는데 

그전에 먼저 터미널 창에

git remote remote origin
git remote add origin https://내토큰@깃헙url.git 
git pull https://내토큰@깃헙url.git

를 해준다.

https://내토큰@깃헙url.git 이라는게  아까 받은 토큰을 복사하여 내토큰에 넣고

깃헙 url

클론할 때 복사하는 주소에서 https://부분 뺀 나머지 주소 깃헙url.git 이다. 

 

그러고 push하면 되는데 만약에 업스트림 브랜치가 없다고 하면 

대충 거기서 하라는대로

git push --set-upstream origin master

해주면 된다. 끝!

댓글