Fork me on GitHub

MoYummy's Blog

Setup git on Centos

  • 29 Nov 2016 100 views Comment(100) Like Report
    Category: git (3)
  • Install git

    sudo -i
    yum install git
    

    Create ssh key

    cd ~
    mkdir .ssh
    chmod 700 .ssh
    cd .ssh
    ssh-keygen # enter, enter, enter
    mv id_rsa moyummygit
    mv id_rsa.pub moyummygit.pub
    cat moyummygit.pub # "ssh-rsa [blahblahblah]== [blahblah]"
    

    Create or edit ~/.ssh/config

    Host github.com
        PreferredAuthentications publickey
        IdentityFile ~/.ssh/moyummygit
    

    Add ssh key to your github account through https://github.com/settings/keys

    Try cloning a git through protocol

    git clone git@github.com:MoYummy/Ruby.git
    

    Try ssh -vT git@github.com for trouble shooting

  • 2017 Mo Yummy
    Powered by Jekyll and Bootstrap
    Creative Commons License
    This work is licensed under a Creative Commons Attribution 4.0 International License.