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

最后进行拉取或者推送

拉取

推送


相关推荐
Sinclair14 分钟前
内网服务器离线安装 Nginx+PHP+MySQL 的方法
运维
叶落阁主24 分钟前
Tailscale 完全指南:从入门到私有 DERP 部署
运维·安全·远程工作
南果梨41 分钟前
OpenClaw 完整教程!从安装到使用(官方脚本版)
前端·git·开源
Selicens1 天前
git批量删除本地多余分支
前端·git·后端
甲鱼9291 天前
MySQL 实战手记:日志管理与主从复制搭建全指南
运维
闲云一鹤2 天前
Git LFS 扫盲教程 - 你不会还在用 Git 管理大文件吧?
前端·git·前端工程化
碳基沙盒3 天前
OpenClaw 多 Agent 配置实战指南
运维
vibecoding日记5 天前
为什么我就想要「线性历史 + Signed Commits」,GitHub 却把我当猴耍 🤬🎙️
git·编程工具
程序员小崔日记5 天前
如何将代码轻松上传到 Gitee?Git 使用全攻略!
git·gitee·上传