Linux服务器如何连接GitHub?
ssh-keygen -C “邮箱” -t rsa
存放位置一般是/root/.ssh/id_rsa
打开Settings,点击SSH and GPG keys,点击New SSH Key。Key中粘贴id_rsa.pub(/root/.ssh/id_rsa.pub)公钥文件中的内容:

ssh-add ~/.ssh/id_rsa
如果在此处遇到Could not open a connection to your authentication agent,解决方法:链接: link
git init
在刚创建的仓库中测试一下SSH Key
ssh -T git@github.com
出现you‘re successful,即为成功。
到此Linux连接GitHub完成。接下来就可以git clone了。
参考:https://blog.csdn.net/XreqcxoKiss/article/details/109854662