zoukankan      html  css  js  c++  java
  • 通过SSH key获取GitHub上项目,导入到IDEA中

    1.在Windows上安装Git

    在Windows上使用Git,可以从Git官网直接下载安装程序,然后按默认选项安装即可

    安装完成后,在开始菜单里找到“Git”->“Git Bash”,或者在文件夹中点右键->“Git Bash”,蹦出一个类似命令行窗口的东西,就说明Git安装成功! 

    2. 配置Git个人信息

    在Git Bash窗口中输入

    $ git config --global user.name "随意起名字"
     
    $ git config --global user.email "你的GitHub邮箱"

    //例如
    $ git config --global user.name "Your Name"
    $ git config --global user.email "email@example.com"

    3. 生成生成SSH key

    $ ssh-keygen -t rsa

    这三处直接回车即可

    4. 由上面路径C:UsersAdministrator.ssh找到id_rsa.pub文件,用文字编辑工具打开,复制

    5. 到自己的GitHub中,找到Settings进入,点击SSH and GPG keys,再新建一个SSH key,将id_rsa.pub文件中的内容放到key中

    6. 测试连接

    $ ssh -T git@github.com

     7. 使用

    $ git clone git@github.com:jianjunhou/spring01.git

    8. 打开idea,进入setting,选择Version Control -> Git -> Path to Git executable选择git安装目录中bin文件夹下的git.exe

    9. 点击后边test按钮测试,成功后如下图

     

     10. 选择菜单栏中的VCS菜单,checkout菜单

     点击Clone

  • 相关阅读:
    Keepalived 无法自动转换主备角色,请关注 iptables 防火墙配置
    Linux 下使用网易的SMTP服务器 发送邮件
    Spring-boot 最小demo
    go build 时报错 cc1.exe: sorry, unimplemented: 64-bit mode not compiled in
    spark-shell 执行脚本并传入参数
    JVM
    spark
    spark
    linux
    linux
  • 原文地址:https://www.cnblogs.com/learnapi/p/10778745.html
Copyright © 2011-2022 走看看