1.打开Mac终端,输入$ cd ~/.ssh检查.ssh文件是否存在($在终端中存在,不需要自己输入),不存在,进行步骤2

2.如果没有安装ssh文件,输入命令$ssh -v,安装ssh文件,成功时返回下面文件

usage: ssh [-1246AaCfGgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
[-D [bind_address:]port] [-E log_file] [-e escape_char]
[-F configfile] [-I pkcs11] [-i identity_file]
[-J [user@]host[:port]] [-L address] [-l login_name] [-m mac_spec]
[-O ctl_cmd] [-o option] [-p port] [-Q query_option] [-R address]
[-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]]
[user@]hostname [command]

3.输入命令ssh-keygen -t rsa -C ".....@qq.com",生成下面东西,在分号后面输入 [press enter],即以默认路径进行文件存储。

Generating public/private rsa key pair.
Enter file in which to save the key (/Users/name/.ssh/id_rsa):[Press enter]

也可以指定特定文件名,比如/c/User/用户名/.ssh/github_rsa

根据终端提示,需要输入密码,在输入一次后还需要再次确认密码

第一次:

Enter passphrase (empty for no passphrase): 

第二次:

Enter same passphrase again:

两次密码输入完成后会产生这些:

Your identification has been saved in [press enter].
Your public key has been saved in [press enter].pub.
The key fingerprint is:
SHA256:Y.........b/h0sNJ/................../8cKMtW4SkEm0 ...@qq.com
The key's randomart image is:
+---[RSA ]----+
| .=o.o. |
| . Eoo.o . |
| = * *. ... |
| + = B Boo.o |
| B S X.B.+..|
| o * + * +...|
| + . = . |
| . . |
| |
+----[SHA256]-----+

4.在GitHub中添加公钥,输入下面没了查看公钥文件,

open ~/.ssh

或者在Mac的Finder下,com+shift+G,搜索文件~/.ssh,也会出现.ssh下面文件

5.在编辑器打开id_rsa.pub文件,复制到GitHub -> setting -> SSH and GPG keys -> New SSH key -> title随便填,然后把复制的文件放进去。

6.打开webstorm,在上面WebStorm打开preferences,搜索GitHub,填写GitHub账号密码,填写完需要设置一个密码,应用,确定即可。

搜索git,按照路径按照git,应用,确定。

7.打开webstorm,在Mac的上面打开VSC -> 版本控制中心 -> git ,复制GitHub的链接

https://github.com/name/Resume-template.git

填写clone路径即可。

Mac上webstorm与git仓库建立连接的更多相关文章

  1. Git在mac中和远程仓库建立连接

    1.下载git http://git-scm.com/download/ 2. 安装git 按照文字提示即可 3. 验证是否成功,输入命令行.输出git版本表示git安装成功. git --versi ...

  2. 在阿里云上搭建私有GIT仓库

    在阿里云上搭建私有GIT仓库 年轻人就得好好学习,不能这么颓废 最近做项目练练手,用到了github, 但是github访问速度是真的慢啊,下载项目,下载一天了.所以呢,我是个成熟的人了,只好自己搭建 ...

  3. git的安装(和远程仓库建立连接)

    安装完git 1.配置用户名和邮箱 $ git config --global user.name "My Name"  $ git config --global user.em ...

  4. Mac上使用jenkins+git持续集成浅析

    本文旨在让同学们明白如何让jenkis在mac笔记本上运行,并实际与一个最简单的git地址交互并执行简单的jenkins任务,如果学习本文,需要先按照https://www.cnblogs.com/x ...

  5. 将本地项目和远程git仓库相连接

    有时候写代码,是存在本地的,远程仓库没有对应的代码库,这个时候就需要把本地的代码项目与远程git库连接并推送. 1. 将项目文件添加到仓库中 本地的项目文档: 添加项目文件 git add . 2. ...

  6. mysql自动备份并上传至git仓库

      自动备份 备份需求 数据库备份的重要性再怎么强调也不为过.当你的操作出现差错,但又因为没有作备份导致数据无法还原时,你就能体会到“万念俱灰”的心情了. 数据库备份有多种形式,本文以我的个人网站数据 ...

  7. git仓库远程连接GitHub

    1 先下载git for windows 然后一直点下一步安装. 2 安装之后,选择git gui.生成ssh 链接 git 公钥. 用命令也可以: $ ssh-keygen -t rsa -C &q ...

  8. mysql for mac 上的安装及用DataGrip连接

    ---恢复内容开始--- 1.首先下载MySQL的mac版本,地址百度就行了. 2.这个时候需要注意安装的时候,弹出来的一个类似窗口,上面有提示默认密码,但是我当时就忘记了这个默认密码,如果你记住了默 ...

  9. 在服务器上搭建远端git仓库

    推荐使用运行Liunx的机器 请获取root权限后进行下面操作 安装git # 检查是否安装了git如果有版本号就无需再安装 git -v # 安装git sudo apt-get install g ...

随机推荐

  1. [Swift]LeetCode204. 计数质数 | Count Primes

    Count the number of prime numbers less than a non-negative number, n. Example: Input: 10 Output: 4 E ...

  2. [Swift]LeetCode594. 最长和谐子序列 | Longest Harmonious Subsequence

    We define a harmonious array is an array where the difference between its maximum value and its mini ...

  3. [Swift]LeetCode852. 山脉数组的峰顶索引 | Peak Index in a Mountain Array

    Let's call an array A a mountain if the following properties hold: A.length >= 3 There exists som ...

  4. [Swift]LeetCode862. 和至少为 K 的最短子数组 | Shortest Subarray with Sum at Least K

    Return the length of the shortest, non-empty, contiguous subarray of A with sum at least K. If there ...

  5. [Swift]LeetCode959. 由斜杠划分区域 | Regions Cut By Slashes

    In a N x N grid composed of 1 x 1 squares, each 1 x 1 square consists of a /, \, or blank space.  Th ...

  6. python之Django学习笔记(二)---Django从工程创建、app创建到表建模在页面的显示

    创建工程: 在命令行中切换目录至需要创建工程的目录,然后在命令行中输入如下命令创建djangoTestPro工程 D:\PycharmProjects\untitled\MyTestProject&g ...

  7. 利用Visual Studio 2017的扩展开发(VSIX、ItemTemplate) 快速实现项目的半自动化搭建

    目录 0.引言 1.什么是Visual Studio项目模板 2.IWizad接口 3.通过Visual Studio扩展开发实现领域驱动开发 3.1 使用VSIX+ProjectTemplate创建 ...

  8. Django+Bootstrap+Mysql 搭建个人博客(一)

    1.1.环境搭建 (1)虚拟环境 mkvirtualenv website pip install django==1.11.7 (2)创建项目和app:website和blog (3)设置中文set ...

  9. BBS论坛(二十三)

    23.添加板块 (1)apps/models class BoardModel(db.Model): __tablename__ = 'board' id = db.Column(db.Integer ...

  10. WeakHashMap

    WeakHashMap 今天在具体业务的时候看到HashMap和WeakHashMap的区别.因为PHP语言并没有这种概念.所以很好奇做了一下研究. WeakHashMap WeakHashMap所谓 ...