码迷,mamicode.com
首页 > 其他好文 > 详细

Git 配置ssh key的步骤

时间:2018-04-24 21:57:59      阅读:579      评论:0      收藏:0      [点我收藏+]

标签:man   oba   style   use   dsa   basic   mos   directory   lock   

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 jasonzeng@...
    • 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的步骤

标签:man   oba   style   use   dsa   basic   mos   directory   lock   

原文地址:https://www.cnblogs.com/ZengYunChun/p/8933405.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!