cd /var/opt/gitlab/git-data/repositories/root/test.git/ 有软连接的话,先删除 rm -rf hooks ### 注意不是 rm -rf hooks/ mkdir hooks cd hooks ln -s /opt/gitlab/embedded/service/gitlab-shell/hooks/pre-receive pre-receive ln -s /opt/gitlab/embedded/service/gitlab-shell/hooks/update update 上传post-receive chown git:git hooks chmod 777 -R hooks
用key ssh-keygen -t rsa -C "your_email@example.com" 或者从gitlab页面添加 添加到/var/opt/gitlab/.ssh/authorized_keys 不行再用绝对路径 而后git clonegit
git clone git@192.168.163.175:root/test.git ------------- http://127.0.0.1:8001/root/showdoc.gitshell