본문 바로가기
ELSE

git 계정 변경, Git Permission denied 될 때

by JiGyeong 2019. 4. 5.

깃을 잘 쓰다가..

 

레파지토리를 변경하려고 했더니 아래와 같은 에러가 떨어졌다.

 

remote: Permission to BaekJiGyeong/Algorithm.git denied to JiGyeong.
fatal: unable to access 'https://github.com/BaekJiGyeong/Algorithm.git/': The requested URL returned error: 403

 

일단은 git 계정 바꾸는 명령어는 이건데...

git config --global user.name "BaekJiGyeong"
git config --global user.email  "이메일~~"

 

아무리 해도 안될때가 있다.

 

명령어를 날리면서 계정을 바꿔봐도 안바뀔 때 해결방법!

 

 

제어판 > 사용자 계정 > 자격 증명 관리자 > Windows 자격 증명

 

여기서 git 과 관련된 계정을 지워주자...

 

그리고 다시 git push 를 하면 반가운 창이 뜬다.

 

 

여기서 바꾸고 싶은 git 계정과 비밀번호를 입력하면 드디어 깃에 잘 올라간다!!ㅠㅠㅠ

 

 

Add...

혹시나

 

fatal: unable to access 'https://github.com/BaekJiGyeong/Algorithm.git/': Could not resolve host: github.com

 

프록시 서버를 사용해서 이런 에러가 뜰경우에는

git config --global --unset http.proxy
git config --global --unset https.proxy

프록시 설정을 해제 해주는 명령어를 날려보자

 

 

깃 저장소 변경
깃 사용자 변경
깃 사용자 계정 변경 할 때