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

最后进行拉取或者推送

拉取

推送


相关推荐
MAVER1CK3 小时前
Docker容器创建好后修改容器配置
运维·docker·容器
NightReader6 小时前
CPU 高使用率,怎么降下来
运维·服务器
SWAGGY..6 小时前
Linux系统编程:(七)Makefile入门:轻松掌握编译自动化
linux·运维·自动化
开开心心就好7 小时前
免费流畅的远程控制实用工具
linux·运维·服务器·网络·智能手机·excel
Tingjct9 小时前
git/gdb指令
大数据·git·elasticsearch
代码熬夜敲Q9 小时前
ENSP 网络工程实验
linux·运维·服务器
銳昊城9 小时前
项目七: 配置与管理Web服务器(2) C2
运维·服务器
Muyuan19989 小时前
30.通过Claude code做项目系统测试
运维·服务器·人工智能·fastapi
yyuuuzz9 小时前
aws的核心概念与常见使用场景
运维·服务器·网络·云计算·aws
KivenMitnick9 小时前
LovelyERes:AWD适用的蓝队综合工具
运维·安全·网络安全