본문 바로가기
개발

git private repository 생성하고 공유하기

by 고양이양말 2022. 9. 2.

1. github에서 "Create a new repository" "Private"로 생성

"Add a README file"을 체크하여 "main" branch까지 생성하는게 편하다

2. 생성한 repository의 settings에서 "Collaborators" 메뉴 진입

"Add people"에 메일 계정 입력하여 추가

3. 해당 메일에서 git invitation accept

4. git 연결

4.1. git clone https://github.com/{repository}.git 수행시 "Repository not found" 에러 발생

4.2. git clone https://공유받는계정이름@github.com/{repository}.git 수행하고 패스워드 입력시 "

Support for password authentication was removed on August 13, 2021." 에러 발생(github가 id, password 인증을 없앰)

4.3. https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token 참고하여 계속 진행

github 공유받는 계정에서 Settings > Developer settings > Personal access tokens에서 "Generate new token". repo 3개 체크하고 생성

4.4 다시 git clone https://공유받는계정이름@github.com/{repository}.git 수행하고 패스워드로는 4.3 에서의 token 입력