钩子
cd /var/opt/gitlab/git-data/repositories/root/test.git/ 有软链接的话,先删除rm -rf hooks### 注意不是rm -rf hooks/mkdir hookscd hooksln -s /opt/gitlab/embedded/service/gitlab-shell/hooks/pre-receive pre-receiveln -s /opt/gitlab/embedded/service/gitlab-shell/hooks/update update上传post-receivechown git:git hookschmod 777 -R hooks
key
用key ssh-keygen -t rsa -C "" 或者从gitlab页面添加 添加到/var/opt/gitlab/.ssh/authorized_keys 不行再用绝对路径 然后git clone
注意git ssh 端口用的是22
git clone :root/test.git -------------