Last active
December 10, 2024 19:13
-
-
Save chriseaton/8fe721ce6ed8f2da22d890d1a1153b8d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#on the server | |
sudo dnf install git gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel -yy | |
sudo useradd git -mr | |
sudo su -c "git config --global init.defaultBranch master" git | |
sudo su -c "chmod 700 ~/.ssh && touch ~/.ssh/authorized_keys && chmod 644 ~/.ssh/authorized_keys" git | |
# MANUAL STEP | |
# add your pub key to /home/git/.ssh/authorized_keys | |
# if you want to explicitly allow certain users over SSH, you can use "AllowUsers". | |
# see: https://man7.org/linux/man-pages/man5/sshd_config.5.html | |
#sudo echo "AllowUsers git" >> ~/etc/ssh/sshd_config | |
sudo systemctl restart sshd | |
# create a bare repo | |
sudo su -c "git init --bare ~/myfirstrepo" git | |
#on your client | |
git clone git@my-amazing-new-server:myfirstrepo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment