🤷🏻♀️ 문제 상황
새로 생성한 로컬 레포지토리와 Github의 원격 레포지토리를 연결하는 작업 중, 최초 push에서 인증 과정을 거치는 상황에서 오류 발생.
🤦🏻♀️ 오류 메시지
remote: Write access to repository not granted.
fatal: unable to access 'https://github.com/id/repository.git/':
The requested URL returned error: 403
🤔 시도 방법
- github에 접속해서 PAT(personal access token)를 재발급 받았으나 새 토큰으로도 해당 오류 여전히 발생함.
- repository에 작성 권한이 없다는 메시지에 주목하여 토큰의 권한을 확인함. (✅)
❗ 원인
PAT를 생성할 때 권한 설정을 해주지 않았음....🥹
오류 로그를 잘 읽자.
⭐ 해결방법
- 프로필 메뉴 -> Settings -> Developers settings -> Personal access tokens
- 생성한 토큰을 클릭 후 Select scopes 메뉴에서 권한 설정 -> update token
- push 재시도