Ubuntu系统git安装使用

  1. 首先查看git是否安装,输入下列代码

    git

    如果提示安装,执行下列语句

    sudo apt-get update
    sudo apt install git
  2. 查看公钥是否生成

    cd ~/.ssh

    如果提示无此目录,说明没有生成

    ssh -keygen -t rsa -C "[email protected]"

    引号内替换为个人github账号邮箱

  3. 打开github网站

点击头像,然后点击settings

点击左边栏标注选项,然后NEW SSH

4.添加公钥

cd ~/.ssh
gedit id_rsa.pub

然后将全部内容复制到github网站中

5.测试

ssh -T [email protected]

 

出现上述内容说明安装完成

猜你喜欢

转载自blog.csdn.net/qq_37786835/article/details/81180569