1. ssh-keygen -t rsa -C "xxxxx@xxxxx.com" //生成ssh key, 当询问生成的文件名时,直接回车
![]()
![]()
会让你输入密码 上传到git 上的 2. cd .ssh 3. cat id_rsa.pub //将key 添加到个人 http://git.xxxx.com/keys 4. ssh -T git@git.oschina.net
Are you sure you want to continue connecting (yes/no)? yes
会出现 Warning: Permanently added 'git.51quzhuan.com,106.15.38.199' (ECDSA) to the list of known hosts. 不需要管
Enter passphrase for key '/root/.ssh/id_rsa': 输入你生成ssh key 填写的密码
成功会出现 Welcome to GitLab, XXXXX