【github】秘钥

问题22端口refused

bash 复制代码
(base) PS F:\0.模块\8.elrs\ExpressLRS-master\src> ssh -T git@github.com
ssh: connect to host github.com port 22: Connection refused
通过GitHub支持的443端口进行SSH连接,绕过对22端口的封锁。

这是解决22端口被阻的最常见方法。GitHub允许通过443端口进行SSH连接。

bash 复制代码
# 确保 .ssh 目录存在
mkdir -p ~/.ssh

# 创建或覆盖 config 文件并写入配置
Set-Content -Path ~/.ssh/config -Value @"
Host github.com
  Hostname ssh.github.com
  Port 443
  User git
  IdentityFile ~/.ssh/id_rsa
"@

如果你使用了网络代理,需要为 Git 命令也配置代理:

bash 复制代码
# 设置全局代理(根据你的代理软件设置修改端口)
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy http://127.0.0.1:7890

# 完成后,可以检查配置
git config --global --get http.proxy

如果某天代理关闭了,需要取消代理设置:

bash 复制代码
git config --global --unset http.proxy
git config --global --unset https.proxy

问题

bash 复制代码
VCSBaseException: VCS: Could not process command ['git', 'clone', '--recursive', 'https://github.com/mavlink/c_library_v2.git', 'C:\\Users\\lenovo\\.platformio\\.cache\\tmp\\pkg-installing-2oegf3e_']

强制 Git 对 GitHub 使用 SSH 协议

你可以通过修改全局 Git 配置,强制所有与 GitHub 的交互都通过 SSH 进行:

bash 复制代码
git config --global url."git@github.com:".insteadOf "https://github.com/"

子模块

当你克隆仓库时,如果没有使用--recursive参数,这些子模块目录就会是空的。

复制代码
git submodule update --init --recursive

这个命令会下载并初始化所有子模块

也可以git clone时加上--recursive(递归)

复制代码
git clone --recursive https://github.com/EdgeTX/edgetx.git
相关推荐
其实防守也摸鱼2 小时前
每天一个知识点——RCE漏洞
运维·服务器·数据库·windows·安全·github·漏洞
u1301302 小时前
GitHub 热榜项目:日榜(2026-09-12)
github
TunerT_TQ3 小时前
Netflix|一个时代的终结:Hystrix静态工程评测,兼谈微服务容错范式的代际迁移
开源·github·资讯
m4Rk_3 小时前
【论文阅读】Agent 记忆机制(68):Memp——把历史轨迹沉淀为可检索、可纠错的程序性记忆
论文阅读·人工智能·学习·开源·github
峰向AI5 小时前
腾讯开源的AI管理的瑞士军刀:让团队经验自动传承
github
Howie_05266 小时前
AI-test-agent(一)刚入门测试也能读懂:一个基于 LangGraph + Playwright 的开源测试工作台
github
zhurui_xiaozhuzaizai6 小时前
github上关于节省token的项目一览,上下文压缩,节省token,agent优化skill,热门项目
人工智能·深度学习·github
旧梦星轨6 小时前
Git Flow 工作流实践
git·gitee·gitlab·github
QUOR7 小时前
ZorvAI · GenUI 技术构架与功能介绍
html·github
CoderJia程序员甲7 小时前
GitHub 热榜项目 - 周榜(2026-09-12)
ai·大模型·llm·github·agent