Hot to setup remote git server ?
- Get/Generate custom ssh keys.
- Add information about cutom host ssh keys to ~/.ssh/config file:
host xxx.xxx.xxx.xxx
HostName xxx.xxx.xxx.xxx
IdentityFile ~/.ssh/XXX
User user
- At server side create repo:
cd /
mkdir -p /opt/git/repo.git
cd /opt/git/repo.git
git init --bare
- At client side make repo:
cd /
mkdir -p ~/repo
cd ~/repo
echo "testdata" > testfile.txt
git add testfile.txt
git commmit -m "initial commit"
git remote add origing ssh://user@xxx.xxx.xxx.xxx:host_port/opt/git/repo.git
git push origing master