git의 새로운 저장소에 코드를 수정하려고 했는데 다음과 같은 오류가 생겼다.
ERROR: Permission to account/repository.git denied to account2.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
gitub 계정이 2개인데 설정을 잘못한 것 같다.
이런 오류가 뜰 때는
git remote remove origin
먼저 기존의 origin 을 지워주고 (origin : 내가 복제해서 가져온 저장소)
내가 넣고자 하는 저장소를 다시 설정해주고
git remote add origin repository주소.git
코드를 push를 해주면 된다
'ERROR' 카테고리의 다른 글
[Python] invalid literal for int() with base 10: '' 해결 (0) | 2022.11.21 |
---|---|
[Python] 날짜형 정리 datetime, date, timestamp (0) | 2022.11.12 |
[Python] unexpected EOF while parsing 에러 해결 (0) | 2022.07.28 |
[PostgreSQL] 타입 변환 오류 (0) | 2022.07.13 |
[Java] 'Error: Could not find or load main class' 해결 (0) | 2022.07.05 |