git 报错:Please make sure you have the correct access rightsand the repository exists 或Permission de

本节内容:

错误原因
解决方案

一.错误原因

安装完git,想要通过ssh的方式下载,需要本机生成公钥与github上的账号进行验证,绑定,才能从github上通过ssh下载项目
二.解决方案

进入https://github.com/settings/profile查看自己的账号和邮箱,记下来,下面会用到。
在这里插入图片描述

打开Git输入命令git config –global user.name “yourname”回车
          git config –global user.email“your@email.com”回车
在这里插入图片描述

ssh-keygen -t rsa -C “your@email.com”(填写自己的邮箱地址)回车

接下来会出现:(一路回车就可以)

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

直到出现:
在这里插入图片描述

之后打开提示的目录下记事本打开id_rsa.pub,复制里面内容。

进入自己的账号https://github.com/settings/keys 点击 New sshKey

复制的内容粘贴到Key里,Title可以不

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值