git-ssh-key协议同步文件

生成秘钥

ssh-keygen -t rsa

sql 复制代码
ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Beza/.ssh/id_rsa):
/c/Users/Beza/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/Beza/.ssh/id_rsa
Your public key has been saved in /c/Users/Beza/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:TqdR91K88888888ncaH5JEixWlRsEm9PUFyJYgw Beza@DESKTOP-LTVDODA
The key's randomart image is:
+---[RSA 3072]----+
|        EA+o++.. |
|       o.+*Bo .  |
|        ++%.@ .  |
|       o + ^ = . |
|      . Y + X +  |
|       o + o .   |
|        o   .    |
|                 |
|                 |
+----[SHA256]-----+

在github上添加秘钥


配置本地仓库

配置好后,在本地小海龟里配置好 remote的名字和URL以及公钥

先进行git bash测试

ssh -T git@github.com

最后进行拉取或者推送

拉取

推送


相关推荐
ficker132 小时前
git常用命令
git
Mr. Cao code3 小时前
Docker:颠覆传统虚拟化的轻量级革命
linux·运维·ubuntu·docker·容器
wanhengidc4 小时前
云手机运行流畅,秒开不卡顿
运维·网络·科技·游戏·智能手机
笨小孩@GF 知行合一5 小时前
OSPF实验:外部路由引入
运维·网络·hcip·数通·ospf
asdfg12589635 小时前
为什么要在出口路由器router配置NAT与默认路由
运维·网络·计算机网络
bug攻城狮6 小时前
Skopeo 工具介绍与 CentOS 7 安装指南
linux·运维·centos
宇宙第一小趴菜6 小时前
08 修改自己的Centos的软件源
linux·运维·centos
qinyia6 小时前
用 Wisdom SSH 轻松实现服务器自动化任务调度
服务器·自动化·ssh
bug攻城狮6 小时前
彻底禁用 CentOS 7.9 中 vi/vim 的滴滴声
linux·运维·服务器·centos·vim
苹果醋36 小时前
数据库索引设计:在 MongoDB 中创建高效索引的策略
java·运维·spring boot·mysql·nginx