Git 配置ssh key的步骤

Posted Jason.Zeng

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Git 配置ssh key的步骤相关的知识,希望对你有一定的参考价值。

First start by setting up your own public/private key pair set. This can use either DSA or RSA, so basically any key you setup will work. On most systems you can use ssh-keygen.

  • First you‘ll want to cd into your .ssh directory. Open up the terminal and run:

    cd ~/.ssh && ssh-keygen

  • Next you need to copy this to your clipboard.
    • On OS X run: cat id_rsa.pub | pbcopy
    • On Linux run: cat id_rsa.pub | xclip
    • On Windows (via Cygwin/Git Bash) run: cat id_rsa.pub | clip
  • Add your key to your account via the website.
  • Finally setup your .gitconfig.
    • git config --global user.name "jason"
    • git config --global user.email [email protected]
    • don‘t forget to restart your command line to make sure the config is reloaded

Thats it you should be good to clone and checkout.

以上是关于Git 配置ssh key的步骤的主要内容,如果未能解决你的问题,请参考以下文章

git SSH Key 生成步骤

Git SSH Key 生成步骤

Git SSH Key 生成步骤

Git SSH Key 生成步骤

Git SSH Key 生成步骤

Git SSH Key 生成步骤