首先安装git
sudo apt-get install git
然后生成ssh key
ssh-keygen -t rsa -C "自己的github对应的邮箱地址"
在这一步会出现
Enter file in which to save the key (/home/用户名/.ssh/id_rsa):
如果只是输入id_rsa的话,之后会找不到/home/用户名/.ssh文件夹。所以最好输入全路径。
输入后会创建两个文件,id_rsa(私钥)和id_rsa.pub(公钥)。
之后将公钥中的内容添加到github中即可。在GitHub网页版中,依次点击Settings -> SSH Keys -> Add SSH Key,将id_rsa.pub文件中的字符串复制进去。
Ubuntu安装Github
最新推荐文章于 2024-09-16 08:05:06 发布