본문 바로가기

카테고리 없음

remote: Permission to xxx.git. The Requested URL returned error: 403 (mac os)

기존 사용하는 git 계정이 아닌 새로 생성한 github 계정으로 접근시

접근 권한에 관한 에러가 떠서 추후 추가적인 이슈가 있을 것을 대비하여 기록을 남겨 놓는다.

fatal: unable to access 'https://github.com/xxx' : The Requested URL returned error: 403

 

github에서 push 시 토큰으로 인증하는 방법으로 변경 되어 일어나는 에러문구로 보이며, 해결 방법은 다음 과 같다.

1.github > 프로필 > settings> personal access tokens > genarate new token

으로 토큰을 생성한다.(이때 토큰은 따로 메모해두어야한다)

2.생성한 토큰을 mac os 의 keychain에 접근하여 , github.com이라는 키체인에 맥북 비밀번호 로 인증후 

암호를 새로 등록해준다. (저장 후 암호보기 해제)

3.github user.name, user.email 변경 

git config user.name <username>
git config user.email <useremail>

git config user.name //user.name 확인
git config user.email //user.email 확인