zoukankan      html  css  js  c++  java
  • GIt -- Window下配置 git

    全局配置

    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):  这里需要你输入一个密码(默认直接输入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 时,你输入的那个密码(我的是填id_rsa

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

  • 相关阅读:
    固定思维的可怕(转)
    Javascript模块化编程:require.js的用法
    js中将字符串转为JSON的三种方式
    cf 55D 数位dp 好题
    fzu 2113 数位dp
    uestc 250 数位dp(水)
    hdu 3652数位dp
    数位dp 3943 二分法
    hdu 3943 经典数位dp好题
    hdu 4871 树的分治+最短路记录路径
  • 原文地址:https://www.cnblogs.com/smallyi/p/8371319.html
Copyright © 2011-2022 走看看