PaaS/CI CD

Git 서버 및 클라이언트 설치

armyost 2021. 5. 12. 21:36
728x90

■ 서버 ssh 비로그인 세팅

클라이언트측

git$ssh-keygen

#chmod 700 ~/.ssh
#chmod 600 ~/.ssh/docker_ssh_key
#chmod 644 ~/.ssh/docker_ssh_key.pub
#chmod 644 ~/.ssh/known_hosts

※ 위와 같이 키 이름이 default가 아니라면 client서버에서 /etc/ssh/ssh_config 에서 key file 경로수정할 것

 

서버측

git$mkdir .ssh
git$vi authorized_keys
에 client의 .ssh/docker_ssh_key.pub 의 내용을 복사

 

■ git 서버 세팅

#yum install git-core

#mkdir /git-repo
#mkidr /git-repo/myapp.git
#cd /git-repo/myapp.git
#git init --bare --share
#chown -R git:git /git-repo

 

 

■ git 클라이언트 세팅
#git config --global user.name "아이디"
#git config --global user.email "이메일주소"
#git config --global color.ui "auto"
#git config --global --list

#mkdir /project
#git clone git@git-server:myapp.git