-
The requested URL returned error: 403Error Collections 2023. 2. 18. 18:01
원인
깃헙에 코드를 푸쉬할 때 해당 주소에 대한 권한이 없기 때문에 403 리턴을 하는 것
$ git push -u origin master remote: Permission to yunajoe/Git_Practice.git denied to [로그인된계정아이디]. fatal: unable to access 'https://github.com/[push하려고하는 repo아이디]/[push하려고 하는 repo]/': The requested URL returned error: 403
해결
시도1
1. 인증하기 git remote set-url origin "https://github-username@github.com/github-username/github-repository-name.git" 를 입력 여기에서 github-username 에는 본인이 github 에서 사용하는 username 을 적으시면 되고 github-repository-name 에는 git reposit 이름을 입력. “” 큰따음표는 제거 제일 처음에 git remote add origin git_reposit_주소.git 을 통해 origin 명칭을 만들었지만 해당 주소에 대한 권한이 없어서 푸쉬를 할 때 에러가 난거에요. git remote rm origin git remote add origin https://github.com/yunajoe/Git_Practice.git git remote set-url origin https://github-yunajoe@github.com/github-yunajoe/Git_Practice.git
안됨
시도2
git config --global user.name 'yunajoe' git config --global user.email 'yunajoe@gmail.com'
안됨
시도3
git:https://github.com을 눌러서 편집을 눌러서 push하려고 하는 repo가 있는 계정 아이디로 변경해준다
성공!
출처:
https://hoohaha.tistory.com/31
https://cpro95.tistory.com/456'Error Collections' 카테고리의 다른 글
Uncaught TypeError: Cannot read property ‘toUpperCase’ of undefined (0) 2023.01.22 깃헙에러(error: src refspec master does not match any) (0) 2023.01.09 git: Your branch and 'origin/master' have diverged (0) 2023.01.06 GIT GUI (0) 2023.01.05 Positional Argument Follows Keyword Argument In Python (0) 2022.10.09