具体问题如下
username@server:~I$ git push
Received disconnect from 20.205.243.166: 11: Bye Bye
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
原因分析
username@server:~$ ssh-add -l -E sha256
The agent has no identities.
发现代理未被识别
可以参考github官网的说明github关于此问题的连接
解决方法
第一步:
删除github上你此服务器的ssh-key
第二步:
username@server:~$rm ~/.ssh/
username@server:~$ssh-keygen -t ecdsa -C '你的github登记的邮箱'
username@server:~$chmod 600 ~/.ssh/id_ecdsa.pub
username@server:~$cat ~/.ssh/id_ecdsa.pub
第三步:
用此公钥重新在github山生成一个ssh-key
第四步:
username@server:~I$ git push
The authenticity of host 'github.com (20.205.243.166)' can't be established.
ECDSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
Are you sure you want to continue connecting (yes/no)? yes
过程中出现Are you sure you want to continue connecting (yes/no)? 肯定输入yes,然后就OK了