github生成SSH公钥
来源:互联网 发布:二战苏联远东部队知乎 编辑:程序博客网 时间:2024/06/06 07:05
在OS X Yosemite 10.10.3安装最新版本Xcode,在terminal下可以发现git已经被安装。
~ mesut$ git --versiongit version 2.3.2(Apple Git-55)
之前就已经注册并且使用Github了,不过一直都是在window 系统下远程管理。
现在开始设置Mac管理Github,有一点需要知道的是本地的git仓库和Github服务器之间是通过ssh加密的。
在终端执行
ozil:tmp mesut$ ssh -vOpenSSH_6.2p2, OSSLShim 0.9.8r8Dec 2011usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] [-D [bind_address:]port] [-e escape_char] [-F configfile] [-I pkcs11] [-i identity_file] [-L [bind_address:]port:host:hostport] [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] [-R [bind_address:]port:host:hostport] [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]] [user@]hostname [command]
明显Mac已经安装了ssh。
1:创建SSH Key
ozil:tmp mesut$ cd ~ozil:~ mesut$ pwd/Users/mesutozil:~ mesut$ cd .ssh-bash: cd: .ssh: No such file or directoryozil:~ mesut$
进入当前的用户目录,波浪线表示的是当前目录。判断是否已经安装了.ssh,避免默认安装会覆盖之前安装的。明显当前目录没有该文件
执行创建 ssh key
ssh-keygen -t rsa -C youremail@example.com(你的Github登陆名)
接着都是回车,选择默认的目录,默认的密码即可
Generatingpublic/privatersa key pair.Enter file in which to save the key (/Users/mesut/.ssh/id_rsa): Created directory '/Users/mesut/.ssh'.Enter passphrase (empty forno passphrase): Enter same passphrase again: Your identification has been saved in /Users/mesut/.ssh/id_rsa.Yourpublickey has been saved in /Users/mesut/.ssh/id_rsa.pub.
接着可以在用户主目录里找到.ssh目录,里面有id_rsa和id_rsa.pub两个文件,这两个就是SSH Key的秘钥对
ozil:~ mesut$ cd .sshozil:.ssh mesut$ lsid_rsa id_rsa.pub
title:可以顺便填名字
key:在Key文本框里粘贴id_rsa.pub文件的内容
点击add key 配置完成
由于之前没有配置用户名,所以首次commit会有提示,自动建立设置方式 git config --global user.name Your Name git config --global user.email email@example.com
1 0
- github生成SSH公钥
- github生成SSH公钥
- github生成SSH公钥
- github生成SSH公钥
- github生成SSH公钥
- windows下生成github ssh 公钥
- windows下生成github ssh 公钥
- GitHub第一步--生成ssh keys
- 生成github的 ssh key
- mac使用git管理Github以及生成 SSH 公钥
- GitHub安装SSH公钥
- GitHub安装SSH公钥
- GitHub安装SSH公钥
- 关于生成Github的SSH密钥
- github与bitbuckut的 ssh生成
- windows下生成github ssh key详解
- github的使用:生成SSH Key
- 如何生成SSH key及访问Github
- Programming in Objective-C 学习笔记10——Cocoa, Cocoa Touch and the iOS SDK
- Linux调试工具
- Hust oj 1143 泉水(dfs)
- csapp中csapp.h和csapp.c
- 【LeetCode-303】Range Sum Query - Immutable
- github生成SSH公钥
- linux目录处理文件处理命令
- GDB 命令详细解释
- Rikka with Chess
- mysql workbench 问题整理
- JS中的call、apply、bind方法
- iOS开发百度导航SDK的使用入门
- 文件的读和写(基础用法)
- Oracle 单个表查询速度极慢处理过程