VS code 本地推送github添加SSH设置

本地VS Code 因为网络环境问题,必须设置SSH才能玩

以下是记录设置SSH步骤 跟做做即可完成。本地推送到远端或者拉去

注意远端有更改 必须先拉下来合并才能推送上去。

你本地电脑里的代码 = 版本 A

GitHub 云端的代码 = 版本 B

B 比 A 新!

Git 的安全规则是:

你不能直接把旧版本推上去覆盖新版本!

它怕你不小心把别人写的代码、云端新文件全部删掉,所以强制拦着你。

PS E:\riscv-k210> ssh-keygen -t ed25519 -C "mygithub"

Generating public/private ed25519 key pair.

Enter file in which to save the key (C:\Users\Administrator/.ssh/id_ed25519):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in C:\Users\Administrator/.ssh/id_ed25519.

Your public key has been saved in C:\Users\Administrator/.ssh/id_ed25519.pub.

The key fingerprint is:

SHA256:9B5OpifiHCoKd=UPuMphFewJrQonSv1Y mygithub

The key's randomart image is:

| |

|... . |

|ooo . . . |

|o .=... S = |

|...=+= E * . |

|.=+= |

|o.B=o |

|.o++.=+. |

PS E:\riscv-k210> cat ~/.ssh/id_ed25519.pub

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5A====U439/gl4nunwih7CJScNl1QO07SV6O1 mygithub

PS E:\riscv-k210> ssh -T git@github.com

Warning: Permanently added the ECDSA host key for IP address '20.205.243.166' to the list of known hosts.

Hi yuzi40277738! You've successfully authenticated, but GitHub does not provide shell access.

相关推荐
饿了吃洗衣凝珠9 小时前
shell
linux·运维·服务器
Decay__11 小时前
PostgreSQL 性能调优方法论 —— pg_stat_statements、EXPLAIN ANALYZE、瓶颈定位流程与参数基线
运维·数据库·sql·postgresql
stormsha16 小时前
中文路径让 MySQL 起不来:Failed to find valid data directory 与 Illegal byte sequence
运维·数据库·mysql
黎羽_16 小时前
终端/办公工具第二组:timewarrior + git-filter-repo + pre-commit + trafilatura + monolith
git·终端工具·开发效率·实战复盘
stormsha16 小时前
MySQL 报 `data directory has files in it`:初始化失败一次,之后就永久起不来
运维·数据库·mysql
skywalk816317 小时前
git上传的时候,它这个版的提交,是否包括了以前的改动? 比如下面这个,它前面的一些改动,会自动因为f91285c70dde 提交而提交吗?
git
沙老师1 天前
Linux Purification Plan - More Modification
linux·运维·服务器
Decay__1 天前
PostgreSQL 高可用与容灾架构 —— 流复制、Patroni、Keepalived+VIP、读写分离与两地三中心
运维·数据库·sql·postgresql
Haooog1 天前
OpenHands 定时任务同步后还是关着?先查 Git Sync 的启停开关
git·agent·定时任务·配置管理·openhands
tz5251 天前
Superpowers 游戏开发实战应用场景大纲
linux·运维·服务器