230804 개발일지 TIL - github error : push declined due to email privacy restrictions

The Web On Everything·2023년 8월 3일
0

개발일지

목록 보기
84/269

remote: error: GH007: Your push would publish a private email address.        
remote: You can make your email public or disable this protection by visiting:        
remote: http://github.com/settings/emails        
error: failed to push some refs to 'https://github.com/hyungjungson/react-tutorial-rq-rtk.git'
To https://github.com/hyungjungson/react-tutorial-rq-rtk.git
!	refs/heads/main:refs/heads/main	[remote rejected] (push declined due to email privacy restrictions)
Done

문제 발생
깃허브 원격저장소에 푸쉬가 안되는 현상

문제 원인
깃허브 설정에서 이메일 주소를 변경 및 이메일 주소를 비공개 처리

문제 해결 방법(시도한 방법)
구글링 중에 stackoverflow의 답변들을 참고하여 해결

  1. 터미널에서 git config --global user.email 명령어로 사용하고 있는 이메일을 확인

  2. 사용하고 있는 이메일이 변경되었으면 git config --global user.email "사용자아이디@메일주소" 로 변경

  3. 적용이 잘 되었는지 git config --global user.email 로 확인

  4. 깃허브 설정 https://github.com/settings/profile -> emails -> Keep my email addresses private 체크박스 해제

  5. 작업폴더에서 푸쉬하면 정상적으로 되는 것을 확인

느낀 점
체크박스 설정으로 인해 푸시오류로 시간을 보낸게 허무하긴 하지만 역시 스택오버플로우다!

profile
오늘은 무슨 오류를 만날까?! 널 만나러 가는 길~ LOL

0개의 댓글