Created
March 12, 2018 02:34
-
-
Save pniaps/57f7bfe1ba1de6e74e845e78d45a35cd to your computer and use it in GitHub Desktop.
Install GIT Centos 7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#install git with user | |
yum install git | |
adduser git | |
passwd git | |
su git | |
cd | |
#add public keys to folder and generate autorized keys | |
mkdir /home/git/.ssh | |
chmod 700 /home/git/.ssh | |
touch /home/git/.ssh/authorized_keys | |
chmod 600 /home/git/.ssh/authorized_keys | |
mkdir /home/git/keys | |
cat /home/git/keys/* > /home/git/.ssh/authorized_keys | |
#create repository | |
mkdir test-repo.git | |
cd test-repo.git | |
git --bare init |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment