The problem: somthing wrong when my computer excute the command "git clone XXXX"
Error:git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Reason:I choose "n" when I first excute git clone command
Solution1:reinstall git
Source:
https://blog.csdn.net/weixin_42128364/article/details/81297741
sudo apt-get purge //常规卸载
sudo apt-get autoremove // 自动清理一些程序
sudo apt-get autoclean
dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P XXX //删除不需要的配置文件
sudo apt-get update //更新本地缓存文件
Solution2: about "ssh"
man -k ssh
Solution3:
https://www.jianshu.com/p/3b56f4e6ac77
git config --global user.name "yourname" //设置Git的user name
和email
git config --global user.email "youremail"
// after these steps,生成SSH密钥
// cd ~/.shh 查看是否已经有了ssh密钥
ssh-keygen -t rsa -C “youremail”
// 生成密钥
DISPLAY
作者:Smallwolf_JS
链接:https://www.jianshu.com/p/3b56f4e6ac77
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。
按3个回车,密码为空
最后得到了两个文件:id_rsa
和id_rsa.pub
在github上添加ssh密钥,这要添加的是“id_rsa.pub”里面的公钥
作者:Smallwolf_JS
链接:https://www.jianshu.com/p/3b56f4e6ac77
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。
作者:Smallwolf_JS
链接:https://www.jianshu.com/p/3b56f4e6ac77
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。
作者:Smallwolf_JS
链接:https://www.jianshu.com/p/3b56f4e6ac77
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。