300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > 解决:Permission denied (publickey).fatal: Could not read from remote repository.

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

时间:2018-09-29 17:54:55

相关推荐

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

github

Permission denied (publickey).fatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.

这个问题的出现主要是 个人SSH key被我从新覆盖了一遍 可是github上面没有添加这个SSH keydom

因此我搜索了网上的解决方法,以下:ssh

在终端输入: ssh-keygen -t rsa -C "AndIMissU"

这条命令的“”里面填写的是本身GitHub的用户名ide

终端出现:

Generating public/private rsa key pair.Enter file in which to save the key (/User/****//.ssh/id_rsa):

按下回车

终端出现:

/User/****/.ssh/id_rsa already exists.Overwrite (y/n)? y

输入y回车

终端出现:

Enter passphrase (empty for no passphrase):

按下回车

终端显示:

Enter same passphrase again:

最后回车出现:

Your identification has been saved in/User/****/.ssh/id_rsa.Your public key has been saved in/User/****/.ssh/id_rsa.pub.The key fingerprint is:SHA256:7emPWueS2x2NHFIliv2E65vDsO9KLZo5JHwytj8aRQs AndIMissUThe key's randomart image is:+---[RSA 2048]----+| . .|| o o o ||E . . + o || o o = ||. S . o o ||*.o..+ o + ||..B *=+ + .||..oB+*o+ . ||.o*+=BO.. |+----[SHA256]-----+

咱们能够看到 咱们的SSH key就存放在/User/****/.ssh/id_rsa.pub目录下

而后咱们须要查看一下 SSH key

在终端中输入cat /User/****/.ssh/id_rsa.pub(这里的cat 后面加的是你本身存放的SSH key 的路径)此时cat 输入之后 出现 你要的SSH key

而后:打开GitHub的Settings 添加一个新的SSH key

最后一步:复制刚刚cat到的SSH key 添加进入下面的红色框框内 这样咱们就能够正常的push和pull啦

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。