【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 小时前
国内MCP工具推荐:AIbase宣布推出MCP资源网站
github·开发者·mcp·aibase·资源网站
一可米3 小时前
gitHub.com Actions自动化发布
运维·自动化·github
小弥儿5 小时前
GitHub今日热榜 | 2026-08-01:硬件安全工具与AI教育并行
人工智能·学习·开源·github
梦想三三7 小时前
LangChain Output Parser 实战:从字符串到结构化数据的完整指南
android·服务器·langchain·github·uv
TunerT_TQ7 小时前
Valhalla 静态工程审阅 #009|Continue 源码证据驱动评测【大厂开源基础设施特辑】
vscode·测试工具·开源·llm·github·jetbrains·ai编程助手
TunerT_TQ7 小时前
Valhalla 静态工程审阅 #008|RisingWave 源码证据驱动评测【大厂开源基础设施特辑】
rust·开源·github·实时数据处理·流式数据库·apacheflink·streamingsql
孪生质数-11 小时前
AI Agent 工程实践(一):大模型 API 接入示范
网络·人工智能·ai·chatgpt·github·claude·claudecode
fthux11 小时前
装闭 RenoPit 源码解析(13):生成AI装修闭坑PDF报告
人工智能·ai·pdf·开源·github
TunerT_TQ12 小时前
Valhalla 静态工程审阅 #007|AgentENV 源码证据驱动评测【大厂开源基础设施特辑】
rust·开源·go·github·sandbox·分布式系统·ai基础设施
小泊客12 小时前
友善R5C刷OpenWrt后RTL8822CE无线网卡显示“禁用”或“未激活”的完整解决方案
linux·github·运维开发