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 [email protected]

最后进行拉取或者推送

拉取

推送


相关推荐
夜影风1 小时前
Linux系统中自签名HTTPS证书
linux·运维·https
wb1891 小时前
流编辑器sed
运维·笔记·ubuntu·云计算
成工小白2 小时前
【Linux】C语言模拟实现shell命令行(程序替换原理)
linux·运维·服务器
福理原乡大王4 小时前
Linux信号详解
linux·运维·服务器·c++·ubuntu·信号处理
孙克旭_4 小时前
day031-Shell自动化编程-数组与案例
linux·运维·自动化
喜欢踢足球的老罗4 小时前
自动化模型管理:MediaPipe Android SDK 中的模型文件下载与加载机制
android·运维·自动化
遇见火星4 小时前
自动化KVM虚拟机创建脚本详解:从模板到高效部署的线上实践!
运维·自动化·kvm
火山引擎开发者社区4 小时前
TickIt:基于 LLM 的自动化 Oncall 升级
运维·自动化·火山引擎
Jditinpc5 小时前
Git使用
git
자신을 변화시키다5 小时前
磁盘配额管理
linux·运维·服务器·ubuntu·磁盘管理