(GIT)Remote Repository 생성

지며리·2023년 1월 10일
0
post-thumbnail

Remote Repository를 생성하고 Local Repository와 연동해보자

Create Remote Repository

  • https://github.com/ 접속, 로그인

  • create repository 버튼 클릭

  • repository name은 local repository 명과 동일하게 설정


Token 할당받기

  • 오른쪽 상단 아이콘 클릭 > Settings 클릭

  • 왼쪽 스크롤 > Developer settings 클릭

  • Personal access tokens > Tokens(classic) > Generate new token

  • note/ expiration/ select scopes 설정 후 Generate token 클릭

  • 할당된 token은 별도로 저장해둡니다. (페이지 나갈 경우 다시 확인 불가)


Local Repository와 연동하기

  • 홈화면(왼쪽 상단 고양이 아이콘 클릭)에서 생성된 remote repository 클릭

  • 상단에 표기된 링크 복사

  • 터미널에서 remote repository와 이름이 같은 local repository까지 이동

  • 터미널 경로 표기란 끝에 master 표기 있는지 확인

  • git remote add origin 링크 붙여넣기 -> githum.com 앞에 username : token @ 추가
    git remote add origin https://username:token@github.com/repository.git

profile
호지자불여락지자

0개의 댓글