码迷,mamicode.com
首页 > Windows程序 > 详细

GIt -- Window下配置sublime text git

时间:2018-01-28 16:34:57      阅读:271      评论:0      收藏:0      [点我收藏+]

标签:img   bsp   post   inf   git安装   ima   rsa   lob   打开   

全局配置

  1.  git config --global user.name "账户名"
  2.  git config --global use r.email ‘账户邮箱‘
  3. 生成ssh,命令: ssh-keygen -t rsa 

 

但是在window终端上ssh命令不能用,只能在Git安装目录下的打开git-bash.exe操作,步骤如下:

Git安装目录下,

找到 git-bash.exe

 输入:ssh-keygen -t rsa -C "email@xx.com"

Administrator /
$ ssh-keygen -t rsa -C "email@xx.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa):  这里需要你输入一个密码,到会连接github需要用到
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Passphrases do not match. Try again.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/Administrator/.ssh/id_rsa.
Your public key has been saved in /c/Users/Administrator/.ssh/id_rsa.pub.

然后到你的GIthub上创建ssh

技术分享图片

 

然后再git-bush.exe,上输入以下命令:

# ssh git@github.com

然后 ,会出现 Enter passphrase for key ‘/c/Users/Administrator/.ssh/id_rsa‘:

叫你输入刚才生成sshkey 时,你输入的那个密码

出现以下情况,表示连接成功。

技术分享图片

 

GIt -- Window下配置sublime text git

标签:img   bsp   post   inf   git安装   ima   rsa   lob   打开   

原文地址:https://www.cnblogs.com/smallyi/p/8371319.html

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