[Error] [Github] The requested URL returned error: 403

이수빈·2023년 5월 25일

Error Log

목록 보기
1/1
post-thumbnail

🥲 pb) git organization 계정 레포에 git push를 수행하다 문제가 발생함 ಥ_ಥ
⭕️ sol) org repo 권한을 가진 새로운 토큰을 생성

에러 전문

~/github/Stock-Price-Prediction (main ✔) ᐅ git push
remote: Permission to Hanyang-SN/Stock-Price-Prediction.git denied to 1092soobin2.
fatal: unable to access 'https://github.com/[your-name]/[repo-name].git/': The requested URL returned error: 403

❓ 에러 발생 이유: 해당 주소에 접근 권한이 없어서
organization의 멤버 권한 설정에서 base permission을 Admin으로 설정했기 때문에 에러 발생이 의아했다.
-> 알고보니 인증 시에 사용되던 personal access token 에 organization repo 관련 권한이 없어서 발생한 문제였다..

Trouble Shooting

1st ❌
remote url 확인하기
git remote set-url origin https://[YOUR_NAME]@github.com/[YOUR_NAME]/[REPO_NAME].git
실패


2nd ❌
organization 소유자 계정으로 접근해서 권한 재설정

실패


3rd ⭕️

personal access token 생성할 때 organization 레포 권한을 체크 안 해서 생긴 문제였다 😭

토큰 생성 시 참고 url
https://hyeo-noo.tistory.com/184

0개의 댓글