깃허브 공식 ssh key 발급 가이드(기존 키 확인/신규 키 발급/추가 키 발급)
1) git bash 또는 cmd/powershell 등 열기
2) 신규 key 발급 받기
ssh-keygen -t ed25519 -C "your_email@example.com"
3) 키 발급 확인

1) 로그인 후 오른쪽 아이콘 클릭

2) Setting 클릭

3) 좌측 메뉴에서 SSH and GPG keys 클릭

4) New SSH Key 클릭

5) ssh 퍼블릭키 Key에 쓰고 등록

6) 등록 완료

1) git 허브에 repository/project 생성
2) git init
3) git remote add {지역저장소명} ssh주소
git retmoe add origin git@github.com:{레파지토리생성한사람이름}/{레파지토리명}.git


4) git ignore 작성 및 적용
4-1) .ignore 파일 생성
4-2) 캐시파일, 모델, 데이터 등의 파일 제외 작성
윗 라인에서 확장자가 .a인 파일은 무시하게 했지만 lib.a는 무시하지 않음
!lib.a현재 디렉토리에 있는 TODO파일은 무시하고 subdir/TODO처럼 하위디렉토리에 있는 파일은 무시하지 않음
/TODObuild/ 디렉토리에 있는 모든 파일 무시
build/doc/notes.txt 파일은 무시하고 doc/server/arch.txt 파일은 무시하지 않음
doc/*.txtdoc 디렉토리 아래 모든 .pdf 파일 무시
doc/ ** / *.pdf
git rm -r --cached .
git add .
git commit -m "Apply .gitignore"
git push
5) git add 업로드파일/폴더 등
git add .
6) 커밋하기
git commit -m "커밋 코멘트 작성"
7) 업로드하기
git push -U origin main
1) git init
2) git remote add origin ssh주소
3) git clone ssh주소

1) git pull origin main
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host isPlease contact your system administrator.
Add correct host key in /c/Users/ /.ssh/known_hosts to get rid of this message.
Offending RSA key in /c/Users/ /.ssh/known_hosts:2
RSA host key for github.com has changed and you have requested strict checking.
Host key verification failed.
fatal: Could not read from remote repository.Please make sure you have the correct access rights
and the repository exists.
해결하기 : ssh-keygen -R ip혹은URL
