Git 설치
[ 프로젝트 협업을 위한 저장소 만들기 ]
Windows Git 다운로드 : https://git-scm.com/download/win
1. 계정생성
terminal> adduser 계정
terminal> cd /home/계정
2. 접근가능한 키 발급(생성) : 비밀번호 입력없이 생성
terminal/home/계정> cd .ssh
terminal/home/계정/.ssh> ssh-keygen -t rsa
terminal/home/계정/.ssh> vi authorized_keys (생성된 키인 id_rsa.pub 파일안의 키값을 복사하여 추가한다)
ps : authorized_keys 파일에 같이 작업할 작업자의 키(작업자의 컴퓨터에서 발급한 id_rsa.pub)를 추가하면 된다.
3. 저장소 생성
terminal/home/계정> mkdir 저장소명 ( ex: test.git )
terminal/home/계정> cd 저장소명
terminal/home/계정/저장소명> git --bare init
4. 저장소 복사 (작업할 폴더에서 저장소 가져오기)
22포트 아닌경우(X) : git clone ssh://계정@아이피 또는 도메인:포트번호/home/계정/저장소명
22포트 인경우(O) : git clone ssh://계정@아이피 또는 도메인/home/계정/저장소명
1) 작업자 등록
terminal/home/계정/저장소명> git config --global user.name "작업자 이름"
terminal/home/계정/저장소명> git config --global user.email "작업자 Email주소"
2) 저장소 환경정보 확인 :
terminal/home/계정/저장소명> git config --list (환경확인)
terminal/home/계정/저장소명> git add README
terminal/home/계정/저장소명> git commit -m '최초올림'
terminal/home/계정/저장소명> git push origin master
--------------------------------------------------