이게 무슨 일이야!

Private git clone 하기 본문

프론트엔드 개발/개발 팁

Private git clone 하기

명동섞어찌개 2022. 4. 13. 10:32

사용환경 : VS Code

문제점 : git repository 를 private 으로 만들면 git clone 이 안된다..

 

0. github 에 로그인 되어있음

 

1. 먼저 ssh 키를 발급받아서 git settting 에 등록

 

https://statistics-and-data.tistory.com/entry/Github-private-repository%EB%A5%BC-clone%ED%95%98%EB%8A%94-%EB%B0%A9%EB%B2%95?category=974877 

 

Github private repository를 clone하는 방법

개인 랩탑에서만 Git을 사용하다가, 회사 노트북을 함께 사용하게 되면서 Private Repository를 clone할 일이 생겼다. 아래와 같이 그냥 치면 당연히 안 된다. git clone https://github.com/ / .git 방법을 찾아..

statistics-and-data.tistory.com

 

윈도우에선 cat 대신 type 명령어로 키 생성

 

나는 저 블로거의 마지막처럼 패스워드 입력창은 안떴다..

 

 

2. git clone

 

이제 VS Code 에서 Terminal 열고

git clone https://~~

 

하는데 또 안되는거

그래서 clone 옵션 중 ssh 로 선택해서 했더니 clone 이 된다.

git clone git@github.com:~~

...

Are you sure you want to continue connecting (yes/no/[fingerprint])? yes //<- yes 하기
Enter passphrase for key '/Use~~' : //<- 여기서 비밀번호 입력하여 세팅해줌

 

clone 성공~!

 

 

3. commit, push 하기

 

VS Code 에서 (Mac) Command + Shift + P 하고 git commit 등을 검색 -> 클릭하면

메시지를 남기며 commit 을 할 수 있다

git push

하면 아까 입력한 ssh 비밀번호를 입력하라는 메시지가 뜨고, 비밀번호 입력하면 push 성공~!

Comments