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

最后进行拉取或者推送

拉取

推送


相关推荐
Yeats_Liao1 小时前
评估体系构建:基于自动化指标与人工打分的双重验证
运维·人工智能·深度学习·算法·机器学习·自动化
爱吃生蚝的于勒1 小时前
【Linux】进程信号之捕捉(三)
linux·运维·服务器·c语言·数据结构·c++·学习
文艺理科生Owen2 小时前
Nginx 路径映射深度解析:从本地开发到生产交付的底层哲学
运维·nginx
期待のcode2 小时前
Redis的主从复制与集群
运维·服务器·redis
十步杀一人_千里不留行2 小时前
Git提交前ESLint校验实践(Husky + lint-staged)
git·github
wangjialelele3 小时前
Linux下的IO操作以及ext系列文件系统
linux·运维·服务器·c语言·c++·个人开发
HypoxiaDream4 小时前
LINUX-Ext系列⽂件系统
linux·运维·服务器
小毛驴8504 小时前
Linux curl 命令用法
linux·运维·chrome
李斯啦果4 小时前
【Linux】Linux目录配置
linux·运维·服务器
AI+程序员在路上4 小时前
linux下线程中pthread_detach与pthread_join区别
linux·运维·服务器