[Git] remote: Write acess to repository not granted.

해밀·2024년 2월 1일

Error

목록 보기
1/1

🤷🏻‍♀️ 문제 상황

새로 생성한 로컬 레포지토리와 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

🤔 시도 방법

  1. github에 접속해서 PAT(personal access token)를 재발급 받았으나 새 토큰으로도 해당 오류 여전히 발생함.
  2. repository에 작성 권한이 없다는 메시지에 주목하여 토큰의 권한을 확인함. (✅)

❗ 원인

PAT를 생성할 때 권한 설정을 해주지 않았음....🥹
오류 로그를 잘 읽자.


⭐ 해결방법

  1. 프로필 메뉴 -> Settings -> Developers settings -> Personal access tokens
  2. 생성한 토큰을 클릭 후 Select scopes 메뉴에서 권한 설정 -> update token
  3. push 재시도
profile
사랑이란 이름의 용기가 필요해

0개의 댓글