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