git custom repository

adduser git
mkdir /git
cd /git
git init --bare sample.git

chown -R git:git sample.git

if port custom:
git clone ssh://git@remote_ip:remote_port/git/download.git master
git push ssh://git@remote_ip:remote_port/git/download.git master

if port is 22
git clone git@remote_ip:/git/download.git master
git push git@remote_ip:/git/download.git master
posted @ 2018-10-31 21:58  idlewith  阅读(199)  评论(0编辑  收藏  举报