GitHub
git clone 시 Username for 'https://github.com' 물어볼 때
whoyoung90
2023. 9. 22. 11:45
반응형
github을 잘 사용하고 있다가 갑자기 Username for 'https://github.com:'을 물어볼 때가 있다.
예전에는 터미널에서 말하는대로 git config 설정을 해주면 되었지만
$git config --global user.name "name"
$git config --global user.email email
21년 8월부터 깃 토큰 인증 방식(Personal Access Token) 방식을 사용하고 있을테니
이메일과 이름 입력만으로는 아래와 같은 에러가 뜰 것이다.
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/.../.../'
> 해결
개인 액세스 토큰을 사용하여 git clone 받으면 된다.
개인 엑세스 토큰을 받는 방법은 해당 URL 참고!
https://whoyoung90.tistory.com/25
username에는 GitHub 사용자 이름, token에는 생성한 개인 액세스 토큰, 사용자/레포지토리에는 복제하려는 레포지토리의 경로를 추가하면 된다.
$git clone https://username:token@github.com/사용자/레포지토리.git
반응형