【IDEA-gitee】Permission denied (publickey). fatal: Could not read from remote repository

在IDEA中从Gitee拉取代码时出现这种问题,于是搜到了下面这篇文章,成功解决

原文地址: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目录,内容如下

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

然后重新输入

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

发布了28 篇原创文章 · 获赞 3 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/qq_34291570/article/details/105563620