打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
vscode使用github
userphoto

2022.09.11 上海

关注
1, vscode打开terminal,生成RSA密钥,并查看蜜月
PS D:\code\SQL> git initReinitialized existing Git repository in D:/code/SQL/.git/PS D:\code\SQL> git config --global user.name amadeusPS D:\code\SQL> git config --global user.email vegas_lee@163.comPS 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.comThe 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.pubssh-rsa me5Aomus6IQmsIRT+tGpWsSSuKhe7WrJhPQmuDl vegas_lee@163.comPS D:\code\SQL>
2,打开github网站,进入仓库,进入setting,设置deploy keys,将id_rsa.pub中的内容粘贴进去即可。
3,terminal绑定本地文件夹和GitHub仓库,并做连接测试:
PS D:\code\SQL> git remote add ztsql git@github.com:vegaslee/sql.gitPS D:\code\SQL> ssh -T git@github.comHi 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 threadsCompressing 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 0remote: Resolving deltas: 100% (18/18), done.To github.com:vegaslee/sql.git * [new branch] master -> masterPS D:\code\SQL>
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
在VSCode中使用码云(Gitee)进行代码管理
vs code如何配置为使用wsl的git?
VS Code 摸鱼又多了个新选择:小霸王!
22个前端必备VsCode插件推荐 – 大师兄
在线版的vscode出山了,如何在本地安排?
十年初心?微软推出轻量级VS Code
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服