当前位置:   article > 正文

Could not read from remote repository.Please make sure you have the correct access rights.and the re_ssh-rsa could not read from remote repository. ple

ssh-rsa could not read from remote repository. please make sure you have the

出现这个问题是因为,没有在github账号添加SSH key,不过不要紧张,其实很简单的步骤就能搞定。

第一大步:获取SSH key

1、在终端命令行输入

ssh-keygen -t rsa -C "用户名"

2、接下来就是根据提示输入存放id-rsa的本地路径了

3、可以一直Enter键把需要设置都设置成默认的设置

下面是测试的一个例子:

$ ssh-keygen -t rsa -C "1581996825@qq.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in 
/c/Users/Administrator/.ssh/id_rsa.
Your public key has been saved in 
/c/Users/Administrator/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:hW5IA3Nosz8awpayOfFZdA5+8OESk2erDcUlMM/+SSQ 用户名
The key's randomart image is:
+---[RSA 2048]----+
|    =o.          |
|    +B. ..       |
|   . =Eoo .      |
|    OoB* .       |
| . + #ooS        |
|o = * O+ .       |
| B + O .o        |
|+ o o .          |
| .               |
+----[SHA256]-----+

到这里其实SSh key就生成了,

找到默认存放id-rsa.pub的路径,里面就是得到的key

第二大步:把SSH key输入到账户

在github账户中找到Account,在下面可以看到一列导航,其中有SSH and GPS keys,

点击SSH 会出现绿色按钮 New SSH key,再次点击

随便输入Title,在下方Key里输入第一大步得到的key,点击Add SSH key就完成了

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/963637
推荐阅读
相关标签
  

闽ICP备14008679号