Please make sure you have the correct access rights
and the repository exists.
1、本地生成ssh key
若是有.ssh的文件夹,删除。默认目录在C:\Users\procloud.ssh。
打开git bash,执行ssh-keygen -t rsa -C “git username”,显示如下:
Generating public/private rsa key pair. 回车 //生成一对公钥私钥
Enter file in which to save the key(/c/Users/username/.shh/id_rsa). 回车 //钥匙保存的路径
Enter passphrase(empty for no passphrase). 回车即可,接下来再次回车。 //输入密码
然后就会显示生成的相关信息。
2、gitlab上配置ssh key。
进入秘钥生成路径,打开id_rsa.pub,将里面的内容全部拷贝。
进入github,打开设置。
将拷贝内容放置其中,新增。
增加成功之后,稍等会,github会发邮件到注册邮箱。
然后在本地就可以clone了。