1、查看本地的ssh ssh -v 2、生成ssh ssh-keygen -t rsa -C "邮箱名称" 3、获取ssh公钥 cat ~/.ssh/id_rsa.pub 4、在GitLab的ProfileSetting下粘贴公钥 5、ok