일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- Form
- 정적배열
- 리액트
- 피그마기초
- gh-pages
- github폴더생성
- 디자인참고
- React
- gitstatus
- hoisting
- html기본태그
- 선택자우선순위
- audioTag
- tableTag
- 컴포넌트
- blockscope
- html
- arrow function
- 변수타입과 레퍼런스
- inlineblock
- inline
- Block
- baekjun
- use-strict
- 공부기록
- 자료구조_배열
- boxshadow
- sectioning Elements
- 코딩독학
- 이벤트캡쳐링
- Today
- Total
//log my lifestyle
[error] git remote: Not Found fatal: repository not found 에러 본문
어젯밤에 이어서
commit을 해도 push를 할때마다 오류가났다.
git@github.com: Permission denied (publickey).
어제는 어찌저찌 따라 눌러보고 하다가 push 성공했는데 오늘 새로운 리포지토리생성후 커밋을했는데
또 푸쉬가 안되는것이다.
그때부터 시작된 not found 오류의 개미지옥..
git remote: Not Found fatal: repository not found
공식문서를 통해 확인해보았다
"repository가 존재하지 않거나 그 repository에 접근 권한이 없기 때문이다."
이말은 즉
- 오타가 없는지 확인하기
- 접근 권한이 있는지 확인하기
- SSH access 에 대해서 확인하기
처음에는 url 경로가 맞게 되어있지않았다.
$ git remote -v
# View existing remotes
> origin https://github.com/ghost/reactivecocoa.git (fetch)
> origin https://github.com/ghost/reactivecocoa.git (push)
$ git remote set-url origin https://github.com/ghost/ReactiveCocoa.git
# Change the 'origin' remote's URL
$ git remote -v
# Verify new remote URL
> origin https://github.com/ghost/ReactiveCocoa.git (fetch)
> origin https://github.com/ghost/ReactiveCocoa.git (push)
그래도 계속 오류가 나왔는데 원인가능성중에 어제 ssh키를 생성했기때문에 이쪽일 가능성이 큰것같았다.
설정창에 ssh키를 확인해봤는데 never used라 되어있고, 접근이 막힌걸까?
나는 처음에 키를 생성하면 자동으로 로컬에도 등록이 되는건줄알았다.
Testing your SSH connection - GitHub Docs
After you've set up your SSH key and added it to your GitHub account, you can test your connection.
docs.github.com
공식문서를 통해 테스트를 해보자
$ ssh -T git@github.com
개인키가 등록이 안되어있다.
#ssh-agent를 시작
$ ssh-agent -s
#개인키를 등록
$ ssh-add ~/.ssh/id_rsa
#ssh-agent를 시작
$ eval $(ssh-agent)
#개인키를 등록
$ ssh-add ~/.ssh/id_rsa
위의 방법으로 했더니 드디어
hi username!이 떴다.
그러고 push 성공
정말 길었던 삽질이었다. 몇시간내내 하면서 왜안되나 해당 에러를 해결한 여러 블로그와 영어사이트를 전전했지만
제일먼저 공식문서를 확인하고 내가 오류난 원인을 아는게 제일 빠른해결의 길임을 느꼈다.
깃헙을 써본지 며칠밖에안되었지만,..오류덕분에 커맨드와 터미널창에 조금이나마 익숙해진것같다.
참고
https://docs.github.com/en/authentication/troubleshooting-ssh/error-permission-denied-publickey
'Web > Git' 카테고리의 다른 글
[error] failed to push some refs to에러 (0) | 2021.10.19 |
---|---|
git status (0) | 2021.08.18 |