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





댓글

이 블로그의 인기 게시물

LSF (GPU 스케쥴링) 명령어 사용법

CentOS 7 리부팅 없이 새 디스크 인식 (find a new disk without reboot)

python에서 hive 사용