
【Git】git报错:git@gitee.com: Permission denied (publickey). fatal Could not read from remote repository
使用git clone的时候报错git@gitee.com: Permission denied (publickey).fatal: Could not read from remote repository.。
·
【Git】git报错:git@gitee.com: Permission denied (publickey). fatal
错误
使用git clone
的时候报错git@gitee.com: Permission denied (publickey). fatal Could not read from remote repository.
如下图所示:
解决办法
添加SSH公钥
绑定gitee用户名和邮箱
git config --global user.name "你的gitee的用户名"
git config --global user.email "你的gitee注册或绑定的邮箱地址"
生成SSH公钥
ssh-keygen -t rsa -C "你注册的或绑定的邮箱地址"
这时会要你输入文件位置和密码,直接回车回车就行
找到你生成的公钥
id_rsa_pub
全部复制
输入密钥名称,把复制的密钥复制进去,点击确定
即可完成。
测试是否成功
ssh -T git@gitee.com
输入上述命令,显示以下内容即成功。
接着就可以进行git clone
操作了
更多推荐
所有评论(0)