Git
[GIT] 2FA Token 발행하여 Clone하기
jjineei
2023. 3. 8. 17:44
회사에서 새로운 git 레파지토리가 이동하면서 신규 project를 clone 하려고 했다.
올바른 ID/PW를 입력했지만 다음과 같은 에러가 났다.
Cloning into 'project name'...
remote: HTTP Basic: Access denied. The provided password or token is incorrect or your account has 2FA enabled and you must use a personal access token instead of a password. See http://git레파지토리 주소
fatal: Authentication failed for http://git레파지토리 주소
[원인]
gitlab에 2fa인증 등록시 기존 PW으로 인증 불가
[해결]
gitlab에서 Token생성하여 PW 대신 입력
나 같은 경우는 Scopes 는 그냥 다 체크함.
토큰명입력후 Create 하면 상단 "Yser new personal access token"에 표시됨.
미리 잘 다른곳에 저장해두기
다시 git clone 후 기존 ID는 그대로 입력.
PW 는 토큰 값 입력 하면 끝 ㅎㅎ