각종 에러들을 해결 해 보자

Github | The requested URL returned error: 403

토오오끼 2024. 3. 26. 00:27
728x90

remote: Permission to "repo" to "name"

fatal: unable to access "repo"

The requested URL returned error: 403

 

github 원격 repo에 push를 했는데 권한이 막혀 있다는 에러를 마주했다.

token을 생성하면서 생긴 문제인데.. 새로운 token을 생성했음에도 해결이 안돼서.. 순서대로 해결 방법을 정리 해 보려고 한다.

 

1. github token 생성

https://iambeginnerdeveloper.tistory.com/249

 

Github token 등록 | remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositori

평소처럼 git push를 한 것 뿐인데 저렇게 에러가 떴다. remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of au

iambeginnerdeveloper.tistory.com

위 링크대로 github token을 생성 해 주면 되는데 권한을 제대로 부여 해 주어야 403 에러가 발생하지 않는다.

꼭 repo 및 아래 기타 권한들을 모두 체크 해 주고 token을 생성 해야 제대로 push가 된다.

 

2. git remote 연결

token을 생성 했다면 기존에 연결 되어 있던 origin을 제거 해 준다.

git remote remove origin

 

이후 발급 받은 토큰을 넣어서 새로 remote origin을 연결 해 준다.

git remote add origin https:<token>@github.com/<user name>/<repo name>.git

 

3. push

git remote -v

제대로 remote가 연결 되었는지 확인 후 다시 push 해 주면 권한 문제 없이 push가 제대로 된다!

728x90