您的位置:首页 > 编程语言

github的使用:生成SSH Key

2016-04-27 20:30 387 查看
检查是否已经存在SSH key

<span style="color:#000066;">$ ls -al ~/.ssh</span>



生成SSH key,将your_email@example.com替换成github的注册邮箱,生成的SSH key默认保存在 ~/.ssh 文件夹中
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
# Creates a new ssh key, using the provided email as a label
Generating public/private rsa key pair.

添加ssh key 到ssh-agent

$ ssh-add ~/.ssh/id_rsa

添加ssh key 到 github 账号中

1.copy ssh-key 到粘贴板

$ clip < ~/.ssh/id_rsa.pub

其余操作见在github添加ssh key
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  github ssh git