Permission denied (publickey). fatal: Could not read from remote repository.

Git clone [email protected]:账户 /项目.git

上面以SSH方式访问用项目出现权限问题

Permissiondenied (publickey).

fatal:Could not read from remote repository.

Pleasemake sure you have the correct access rights

andthe repository exists.

 

解决方法:

在git.bash.窗口输入

ssh-keygen–t rsa –c”你的邮箱地址”

ssh-keygen -t rsa -C "邮箱地址"

然后一直回车就行

操作成功后会在

C:\Users\Administrator目录下生成一个.ssh目录,内容如下

Permission denied (publickey). fatal: Could not read from remote repository._第1张图片

Id-rsa是你的私钥,用笔记本方式打开id_rsa.pub把里面的公钥复制到coding.net的账户下面的SSH公钥下

 Permission denied (publickey). fatal: Could not read from remote repository._第2张图片

然后重新输入

Git clone [email protected]:账户 /项目.git就OK了

Permission denied (publickey). fatal: Could not read from remote repository._第3张图片

你可能感兴趣的:(Git)