vscode使用github.211014

1, vscode打开terminal,生成RSA密钥,并查看蜜月

PS D:\\code\\SQL> git init
Reinitialized existing Git repository in D:/code/SQL/.git/ PS D:\\code\\SQL\> git config --global user.name amadeus
PS D:\\code\\SQL\> git config --global user.email vegas_lee@163.com
PS D:\\code\\SQL\> ssh-keygen -t rsa -C "vegas_lee@163.com" Generating public/private rsa key pair.
Enter file in which to save the key (C:\\Users\\vegas/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your public key has been saved in C:\\Users\\vegas/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:JTEfU8+j6+dxrYqoiCy+jbUNHUXCQGvF3rY/6FFjC5E vegas_lee@163.com
The key's randomart image is:
+---\[RSA 3072\]----+
| .o+o .o o.. |
| ooo .+ o o |
| o. .E. o + |
| . ..o.o . . |
| ...S+ . |
| . ..\+ o . .|
| o . .o. . . o|
|..\+.\+. ..\+ o .+ |
|.=+o..oo. o o+o |
+----\[SHA256\]-----+ PS D:\\code\\SQL\> cat ~/.ssh/id_rsa.pub ssh-rsa me5Aomus6IQmsIRT+tGpWsSSuKhe7WrJhPQmuDl vegas_lee@163.com
PS D:\\code\\SQL>

2,打开github网站,进入仓库,进入setting,设置deploy keys,将id_rsa.pub中的内容粘贴进去即可。
assets/vscode使用github.211014/file-20250116165127281.png

3,terminal绑定本地文件夹和GitHub仓库,并做连接测试:

PS D:\\code\\SQL> git remote add ztsql git@github.com:vegaslee/sql.git
PS D:\\code\\SQL\> ssh -T git@github.com
Hi vegaslee/sql! You've successfully authenticated, but GitHub does not provide shell access.

4,做一次推送

PS D:\\code\\SQL> git push --force ztsql master
Enumerating objects: 110, done.
Counting objects: 100% (110/110), done.
Delta compression using up to 8 threads
Compressing objects: 100% (107/107), done.
Writing objects: 100% (110/110), 68.98 KiB | 255.00 KiB/s, done.
Total 110 (delta 18), reused 0 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (18/18), done.
To github.com:vegaslee/sql.git \* \[new branch\] master -> master
PS D:\\code\\SQL>
posted @   中国的Amadeus  阅读(6)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
历史上的今天:
2009-01-16 【Vegas原创】查找删除重复键的数据
2009-01-16 【Vegas原创】SQL Server 阻止了对组件 'SQL Mail XPs' 的 过程'sys.xp_sendmail' 的访问的解决方法
点击右上角即可分享
微信分享提示