git安装步骤

  1. 安装git

    yum -y install git git-core

    git version #查看git版本,确认安装是否成功。

  2. 生成私钥和公钥

    cd ~/.ssh

    ls

    ssh-keygen -t rsa -C "*****@163.com" //不要输入密码,否则以后很麻烦

    cat ~/.ssh/id_rsa.pub  # 查看公钥

  3. 修改私钥权限

    chmod 600 ~/.ssh/id_rsa.

    chown gelu:staff ~/.ssh/id_rsa

  4. 注册github,并在account set内设置ssh key

    github地址: https://github.com

  5. 登陆github

    ssh -T git@github.com # 会看到:Hi gelu8888! You've successfully authenticated, but GitHub does not provide shell access.

原文地址:https://www.cnblogs.com/gelu/p/7654745.html