React

[노드]SSH 이용해서 GITHUB 연결하기 (github 소스 배포 방법)

뉴라코 2024. 11. 24. 14:54
GIT은 툴이라면 GITHUB는 이를 이용하는 서비스(클라우드)

  • github 연결하는 방법

1. github 회원가입

https://github.com/

 

GitHub · Build and ship software on a single, collaborative platform

Join the world's most widely adopted, AI-powered developer platform where millions of developers, businesses, and the largest open source community build software that advances humanity.

github.com

 

 

2. 'create repository' 클릭

1

3. 하지만 내 컴퓨터와 github 서버가 안전하게 통신하는 방법이 없기 때문에

github repository에서 준 코드를 입력해도 오류가 뜬다.

4. SSH를 설정(Secure shell)해야하는데 powershell 에 is -a~/.ssh를 입력해본다.

5. id_rsa , id_rsa.pub이 뜬다면 설정되어 있는 것 ! 아니라면 google에 git ssh 입력

6. 터미널 열고 그대로 복사 붙여넣기(대신, 이메일은 github이메일로!)

7.powershell 에서 ssh agent에 ssh 키 추가한다

8. 오른쪽 버튼 눌러서 '관리자권한으로 실행'으로 powershell을 키고 ssh-agent 시작 명령을 한다.

9. 프라이빗 키를 추가한다 (ssh-add)

10. 퍼블릭을 추가한다 (cat ~/.ssh/id_ed25519.pub)

11

11. github 의 settings을 누른다

12. new GPG key를 누른다

13. 터미널에 뜬 public 관련 sshkey를 입력해준다.

드.디.어 내 컴퓨터와 github서버 통신이 완벽한 상태가 됨! git hub 의 repositories에 있는 코드 옮길 수 있다!


1. repositories에 가서 맨 첫 번째 줄만 긁어옴(git init, git commit은 이미 해놨어서)

2. 차례대로 넣으니 brower로 열거냐고 물어봐서 그렇다고 함.

3. 로그인하고 access 허용하겠다고 하니 이제 완벽하게 됐다고 뜸!

4. repositories 다시 새로고침(f5)하니 내 파일들이 올라감. ㅎㅎ