Git & GitHub 的安装配置

参考

    教你免费搭建个人博客,Hexo&Github

    安装Git

1. 注册 GitHub

  注册、登录 https://github.com/

2. 创建仓库

  在 GitHub 的右上角选择

  Create a new repository https://github.com/new

3. 安装配置 Git

   默认安装 Git

  在Windows上使用Git,可以从Git官网直接下载安装程序,(网速慢的同学请移步国内镜像),然后按默认选项安装即可。

  安装完成后,在开始菜单里找到 “Git”->“Git Bash” ,出现类似命令行窗口的东西,就说明Git安装成功!

  

  安装完成后在命令行输入( GitHub 的账户与密码)

  $ git config --global user.name "Your Name"
  $ git config --global user.email "[email protected]"

3. 配置 SSH 免密登陆

  打开 CMD,输入:

  ssh-keygen -t rsa -C "Github的注册邮箱地址"

  一直 Enter ,得到信息:

  Your public key has been saved in /c/Users/user/.ssh/id_rsa.pub.

  找到该文件,打开(sublime text), Ctrl + a复制里面的所有内容

  进入Sign in to GitHub:https://github.com/settings/ssh/new

  New SSH

  key ——[ Title:title_name ] 

  Key:输入刚才复制的

  Add SSH key

  

4. 验证是否能够 ssh 到 GitHub 服务器


  使用 git-bash.exe

  $ ssh [email protected]

  

猜你喜欢

转载自www.cnblogs.com/share23/p/9698421.html