©CC BY-NC-SA 4.0
🚩加入 Nostr!moe 社区: join.nostr.moe
部分 GitHub 尚未发布到 DNS 中的 IPv6 地址, 可手动添加到 hosts 解决 IPv6 单栈网络下的大部分 GitHub 访问问题.
GitHub IPv6 proxy

2a01:4f8:c010:d56::2 github.com
2a01:4f8:c010:d56::3 api.github.com
2a01:4f8:c010:d56::4 codeload.github.com
2a01:4f8:c010:d56::6 ghcr.io
2a01:4f8:c010:d56::7 pkg.github.com npm.pkg.github.com maven.pkg.github.com nuget.pkg.github.com rubygems.pkg.github.com
2a01:4f8:c010:d56::8 uploads.github.com
2606:50c0:8000::133 objects.githubusercontent.com www.objects.githubusercontent.com release-assets.githubusercontent.com gist.githubusercontent.com repository-images.githubusercontent.com camo.githubusercontent.com private-user-images.githubusercontent.com avatars0.githubusercontent.com avatars1.githubusercontent.com avatars2.githubusercontent.com avatars3.githubusercontent.com cloud.githubusercontent.com desktop.githubusercontent.com support.github.com
2606:50c0:8000::154 support-assets.githubassets.com github.githubassets.com opengraph.githubassets.com github-registry-files.githubusercontent.com github-cloud.githubusercontent.com

除了 2606:50c0:8000::133 是 Fastly 本身的 IP, 其他的都是文章作者在自己的 Hetzner 服务器上运行的四层代理.

#GitHub

via @[email protected]
用 443 端口的 SSH 连接 GitHub

22 端口可能会由于各种原因被防火墙, 流量代理, 甚至网络运营商屏蔽. 造成连接到 git 仓库进行远程操作时出现连接关闭:
kex_exchange_identification: Connection closed by remote host
Connection closed by 20.205.243.166 port 22
fatal: Could not read from remote repository.

Please make sure you have the correct access rights

GitHub 支持使用 443 端口进行 SSH 连接, GitHub Enterprise Server 不受支持:
在 HTTPS 端口使用 SSH - GitHub 文档
只需要对现有的 SSH 本地配置进行修改, 在 Host 条目下将 HostName 从 github.com 变更为 ssh.github.com, 添加选项 Port 值为 443, 如:
# Work account-1
Host github.avatar
   HostName ssh.github.com
   Port 443
   User git
   IdentityFile ~/.ssh/id_rsa_avatar

#git #GitHub

via CXPLAY's Memos
 
 
Back to Top