git server centos8에 설치
server==============
yum install git
git --version
useradd git
passwd git
git init --bare /home/git
client=============
탐색기에서 디렉토리를 만들어서
오른쪽 클릭해서 git bash 실행
mkdir .ssh
cd .ssh
ssh-keygen -t rsa
scp id_rsa.pub git@192.168.56.202 /home/git
server==============
su -git
mkdir /home/git/.ssh
cat /home/git/id_rsa.pub >> /home/git/.ssh/authorized_keys
client============
ssh -v git@192.168.56.202 (접속확인)
server==============
/etc/passwd
git:x:1002:1003::/home/git:/usr/bin/git-shell 변경
vi /etc/shells
마지막 줄에 /bin/git-shell 추가
client====================
적정한 디렉토리에서 git-bash 실행
git clone ssh://git@192.168.56.201:/home/git
cd git
touch test.txt
echo "test" >> test.txt
git add .
git commit --message "msg"
git push origin master
댓글
댓글 쓰기