Git SSH Key 生成步骤
来源:互联网 发布:魔力宝贝用辅助软件 编辑:程序博客网 时间:2024/05/18 02:41
git是分布式的代码管理工具,远程的代码管理是基于ssh的,所以要使用远程的git则需要ssh的配置。
github的ssh配置如下:
一 、
设置git的user name和email:
<span style="font-size:18px;">$ git config --global user.name "amazingZy"</span>
<span style="font-size:18px;">$ git config --global user.email "你的邮箱"</span>二、生成SSH密钥过程:
1.生成密钥:
$ ssh-keygen -t rsa -C “你的邮箱”
按3个回车,密码为空。
Your identification has been saved in /home/tekkub/.ssh/id_rsa.
Your public key has been saved in /home/tekkub/.ssh/id_rsa.pub.
The key fingerprint is:
………………
最后得到了两个文件:id_rsa和id_rsa.pub
2、在终端输入
cat ~/.ssh/id_rsa.pub
回车后会返回:
zhangyangyangdeMacBook-Pro:.ssh zhangyangyang$ cat ~/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6TY5OYa3OpOcTyPNj0++qDId5ek9VWySTrZsqJ/6Q9IUppR7g1zNrnck208bz8tSJwUg08qT+0tG/F1uuOs8i3z/IHd9Rv+TDG8vvAJDace1N1fQdVpDxrydPtgFR9WKUjvxFQKRj9SrBkxXf1QLU22abShvx9WKvWLv8NC/yDf7EhnR8tT8Xib9kCaArEsONLYOtrvlccdiHDztbGP2pbxzp8pJGTBMttzKGnQukIY0h+kIk0QcBU3/R+SKIhX9MxflE7t2AjN69pZWlrBdE7VxugM7uUkVyuIL1GSCVSk0DAZP3kE+tW2EomBfeAT77cND+duilmcHY4hGD0NpP “xxxx@qq.com”
3、把公钥添加到 Git @ OSC http://git.oschina.net/keys
4、添加后,在终端(Terminal)中输入
ssh -T git@git.oschina.net若返回
Welcome to Git@OSC, yourname! 就大功告成了,如果没成功就到http://git.oschina.net/keys查看一下key再执行ssh -T git@git.oschina.net就行了
- Git SSH Key 生成步骤
- Git SSH Key 生成步骤
- Git SSH Key 生成步骤
- Git SSH Key 生成步骤
- Git SSH Key 生成步骤
- Git SSH Key 生成步骤
- Git SSH Key 生成步骤
- Git SSH Key 生成步骤
- Git SSH Key 生成步骤
- Git SSH Key 生成步骤
- Git SSH Key 生成步骤
- Git SSH Key 生成步骤
- Git SSH Key 生成步骤
- Git SSH Key 生成步骤
- Git SSH Key生成步骤
- Git SSH Key 生成步骤
- Git SSH Key 生成步骤
- Git SSH Key 生成步骤
- LeetCode:268. Missing Number
- I2C与SPI总线对比
- [知了开发]“知了”优化-整体架构
- 手机Android音视频采集与直播推送,实现单兵、移动监控类应用
- 关于Vs2012重新生成解决方案时提示exe访问被拒绝的处理方式
- Git SSH Key 生成步骤
- CSS学习笔记:优先级
- Yii2 render 和 renderPartial 问题
- LeetCode-260:Single Number III
- gipchaInternalResolve:failed to resolve ret gipcretKeyNotFound(36),
- 按钮功能的实现
- [从头学数学] 第245节 Python实现数据结构:排序
- C#如何获得动态生成的控件
- Django博客开发(十三)—一个简单的站内搜索