使用ssh方式 连接到github
2016-11-03 00:00
169 查看
参考:http://cuiqingcai.com/423.html
设置git 用户名和邮箱
$ git config --global user.name "Your Name"
$ git config --global user.email "email@example.com"
打开shell 这里使用git bash
$ ssh-keygen -t rsa -C "youremail@example.com"
创建key
会有以上问题 一路回车即可
使用默认值即可,由于这个Key也不是用于军事目的,所以也无需设置密码。
会默认在 C:\Users\s\.ssh 这个文件家下 创建id_rsa id_rsa.pub 两个文件
其中 id_rsa.pub 为对外使用的
2.在github上配置
登陆github 点击右上角 选中设置 添加sshkey 输入 id_rsa.pub 中的内容即可
注意remote 要添加 ssh 的地址
可以使用git remote get-url 或者 git remote remove +git remote add
命令修改url
准备步骤
安装git设置git 用户名和邮箱
$ git config --global user.name "Your Name"
$ git config --global user.email "email@example.com"
配置SSH key
1.创建ssh key打开shell 这里使用git bash
$ ssh-keygen -t rsa -C "youremail@example.com"
创建key
会有以上问题 一路回车即可
使用默认值即可,由于这个Key也不是用于军事目的,所以也无需设置密码。
会默认在 C:\Users\s\.ssh 这个文件家下 创建id_rsa id_rsa.pub 两个文件
其中 id_rsa.pub 为对外使用的
2.在github上配置
登陆github 点击右上角 选中设置 添加sshkey 输入 id_rsa.pub 中的内容即可
push 到github
最后将本地仓库push到github注意remote 要添加 ssh 的地址
可以使用git remote get-url 或者 git remote remove +git remote add
命令修改url
相关文章推荐
- 使用ssh方式 连接到github
- 使用ssh连接gitHub
- 使用 ssh 连接github的方法说明(gitub的官方说法)
- github使用(通过webstorm创建一个nodejs项目的本地git库,推送到github进行管理,(ssh密钥无用户密码方式))
- github使用ssh方式免密码同步方式
- VirtualBox 使用 NAT 方式网络的 SSH 连接
- eclipse使用ssh加密方式上传到github常见错误
- Linux使用SSH远程连接方式和更改密码 ,自己空间转移过来的。
- 使用ssh连接gitHub
- GitHub---(使用SSH方式)
- 使用SSH密钥连接Github
- ubuntu下git使用ssh连接github
- 使用ssh连接github
- 使用ssh连接gitHub
- VirtualBox 使用 NAT 方式网络的 SSH 连接
- 使用SSH密钥连接Github
- git使用系列(1)-使用SSH密钥连接Github【图文教程】
- 使用SSH密钥连接Github
- 使用的gogs不能使用ssh的方式连接
- 使用SSH密钥连接Github【图文教程】