Linux

Linux CentOS Stream 9 - Git Install 설치

Ryan's Tech Note 2023. 2. 18. 16:15

GIT 을 설치한다.

dnf -y install git

 

GIT 사용자를 추가하고, 비밀번호를 입력한다.

useradd git
passwd git

 

GIT 설정을 한다. GIT 사용자 이름을 입력한다.

git config --global user.name "<NAME>"
git config --global user.email "<EMAIL>"

 

GIT 레파지토리를 추가해보자.

su - git
cd ~
ssh-keygen -t rsa (다음 나오는 질문에 계속 엔터를 친다)
mkdir /home/git/repo
mkdir /home/git/repo/<projectName>.git
cd /home/git/repo/<projectName>.git
git init --bare


이클립스로 접속 테스트를 해본다.

putty 로 사전에 SSH 접속이 되는지 테스트 해보고 하자.

[URL]
git@ssh://<ip>:<port>/home/git/repo/<projectName>.git

 

도움이 되었다면 공감과 댓글 한번 부탁드립니다.