티스토리 뷰

TIL

GitHub 기본 패스워드 인증

해미깨미 2021. 2. 15. 21:58

깃허브에서 기본 패스워드 인증이 2021년 8월 13일까지만 가능하니 personal access token을 이용하라는 메일이 왔다.

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 and will instead require token-based authentication (for example, a personal access, OAuth, or GitHub App installation token) for all a

github.blog

깃허브 데스크톱은 괜찮다고 나와있으니 상관없는데, 인텔리제이에 등록한 깃허브 계정 설정도 바꿔줘야 되나 싶었지만 키체인에서 등록된 비밀번호를 확인해 보니 다행히 인텔리제이가 알아서 등록한 비밀번호를 암호화해서 인증에 사용하고 있었다.

 

개인 액세스 토큰은 docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token

 

Creating a personal access token - GitHub Docs

Creating a personal access token You should create a personal access token to use in place of a password with the command line or with the API. Personal access tokens (PATs) are an alternative to using passwords for authentication to GitHub when using the

docs.github.com

여기를 참고해서 만들면 된다.

참고로 액세스 토큰을 발급받고 새로고침을 하거나 다른 페이지로 가면 절대 안 된다.

보안상의 이유로 다시는 토큰 값을 조회할 수 없게 되기 때문이다.

 

 

만약 자동으로 인증되게 설정해 놨다면 docs.github.com/en/github/using-git/updating-credentials-from-the-macos-keychain

 

Updating credentials from the macOS Keychain - GitHub Docs

Updating credentials from the macOS Keychain You'll need to update your saved credentials in the git-credential-osxkeychain helper if you change your username, password, or personal access token on GitHub. When Git prompts you for your password, enter your

docs.github.com

여기를 참고해서 등록된 아이디와 비밀번호를 바꿔주면 된다.

 

이상하게 키체인에서 직접 계정 정보를 삭제하는 게 안돼서(경고 창도 안 뜬다.) 하는 수 없이 커맨드 라인 명령어로 바꿔줬다.

$ git credential-osxkeychain erase
host=github.com
protocol=https

터미널에 명령어를 입력하면 아무런 응답 없이 가만히 있는데 그냥 엔터를 한번 더 치면 된다.

 

키체인에서 계정 정보가 삭제됐는지 확인하고 인증이 필요한 작업(pull, push, clone 등등...)을 하면 아이디와 비밀번호 입력창이 나타나게 된다.

 

아이디는 그대로, 비밀번호는 발급받은 토큰 값을 넣어주면 성공적으로 작업이 수행된다.

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/10   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
글 보관함