Git/troubleshooting
git push시 fatal: Authentication failed for 해결
Lim Seung Hyun
2022. 3. 4. 15:55
상황
새로운 VM에 git의 repo를 clone 후 코드를 업로드를 위해 git push시 Username과 Password 입력 후 fatal: Authentication failed for <repo link>가 발생
원인
password authentication가 만료되어서 발생
해결 방법
Github - Settings - Developer setting - Personal access tokens 에서 Generate new token 실행
- Note : token 설명
- Expiration : 토큰 만료일자
- Select scopes : token의 access 범위
생성된 Token을 복사 후 git push 이후 password 대신 해당 token key를 붙여넣기
※ error: src refspec master does not match any 에러가 발생할 수 있는데 이건 master branch가 없어서 발생할 수 있음
git checkout -b master 이후 git push origin master
728x90