-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bb4dd08
commit 997d03a
Showing
9 changed files
with
67 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<!doctype html><html lang=en-us><head><meta charset=utf-8><meta http-equiv=x-ua-compatible content="ie=edge"><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name=google-site-verification content="M1Cw9Od63LZv4K4V_iX8zomHSDnAy0-cWtfnSSas5YY"><meta name=referrer content="no-referrer-when-downgrade"><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7158791715796373" crossorigin=anonymous></script><link rel=preload as=font href=https://clannad.icu/fonts/vendor/jost/jost-v4-latin-regular.woff2 type=font/woff2 crossorigin><link rel=preload as=font href=https://clannad.icu/fonts/vendor/jost/jost-v4-latin-700.woff2 type=font/woff2 crossorigin><link rel=stylesheet href=https://clannad.icu/main.bc40af54f7e40197242da743d1b0597227d5df5587b398645652d5f2a3b51b7e01e4d48804526a65cf2f4dea28a20c8577bc96fc2f1702f3d235d7530b9f5b9d.css integrity="sha512-vECvVPfkAZckLadD0bBZcifV31WHs5hkVlLV8qO1G34B5NSIBFJqZc8vTeooogyFd7yW/C8XAvPSNddTC59bnQ==" crossorigin=anonymous><noscript><style>img.lazyload{display:none}</style></noscript><meta name=robots content="index, follow"><meta name=googlebot content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1"><meta name=bingbot content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1"><title>在 HTTPS 端口使用 SSH - CL</title><meta name=description content="CLを書いて、人生を読みます。"><link rel=canonical href=https://clannad.icu/blog/532834567/><meta name=twitter:card content="summary"><meta name=twitter:title content="在 HTTPS 端口使用 SSH"><meta name=twitter:description content="在 HTTPS 端口使用 SSH 有时,防火墙会完全拒绝允许 SSH 连接。 如果无法选择使用具有凭据缓存的 HTTPS 克隆,可以尝试使用通过 HTTPS 端口建立的 SSH 连接克隆。 大多数防火墙规则应允许此操作,但代理服务器可能会干扰 | ||
GitHub Enterprise Server 用户:目前不支持经 SSH 通过 HTTPS 端口访问 GitHub Enterprise Server。 | ||
要测试通过 HTTPS 端口的 SSH 是否可行,请运行以下 SSH 命令: | ||
$ ssh -T -p 443 [email protected] > Hi USERNAME! You've successfully authenticated, but GitHub does not > provide shell access. 注意:端口 443 的主机名为 ssh.,而不是 ``。 | ||
如果这样有效,万事大吉! 否则,可能需要遵循我们的故障排除指南。 | ||
现在,若要克隆存储库,可以运行以下命令: | ||
git clone ssh://git@ssh.:443/YOUR-USERNAME/YOUR-REPOSITORY.git 启用通过 HTTPS 的 SSH 连接 如果你能在端口 443 上通过 SSH 连接到 git@ssh."><meta name=twitter:site content="@"><meta name=twitter:creator content="@"><meta property="og:title" content="在 HTTPS 端口使用 SSH"><meta property="og:description" content="在 HTTPS 端口使用 SSH 有时,防火墙会完全拒绝允许 SSH 连接。 如果无法选择使用具有凭据缓存的 HTTPS 克隆,可以尝试使用通过 HTTPS 端口建立的 SSH 连接克隆。 大多数防火墙规则应允许此操作,但代理服务器可能会干扰 | ||
GitHub Enterprise Server 用户:目前不支持经 SSH 通过 HTTPS 端口访问 GitHub Enterprise Server。 | ||
要测试通过 HTTPS 端口的 SSH 是否可行,请运行以下 SSH 命令: | ||
$ ssh -T -p 443 [email protected] > Hi USERNAME! You've successfully authenticated, but GitHub does not > provide shell access. 注意:端口 443 的主机名为 ssh.,而不是 ``。 | ||
如果这样有效,万事大吉! 否则,可能需要遵循我们的故障排除指南。 | ||
现在,若要克隆存储库,可以运行以下命令: | ||
git clone ssh://git@ssh.:443/YOUR-USERNAME/YOUR-REPOSITORY.git 启用通过 HTTPS 的 SSH 连接 如果你能在端口 443 上通过 SSH 连接到 git@ssh."><meta property="og:type" content="article"><meta property="og:url" content="/blog/532834567/"><meta property="article:published_time" content="2024-05-22T07:51:17+00:00"><meta property="article:modified_time" content="2024-05-22T07:51:17+00:00"><meta property="og:site_name" content="CL"><meta property="article:publisher" content="https://www.facebook.com/"><meta property="article:author" content="https://www.facebook.com/"><meta property="og:locale" content><script type=application/ld+json>{"@context":"https://schema.org","@type":"Article","mainEntityOfPage":{"@type":"WebPage","@id":"\/blog\/532834567\/"},"headline":"在 HTTPS 端口使用 SSH","image":[],"datePublished":"2024-05-22T07:51:17CET","dateModified":"2024-05-22T07:51:17CET","author":{"@type":"Organization","name":"CL"},"publisher":{"@type":"Organization","name":"CL","logo":{"@type":"ImageObject","url":"\/logo-doks.png"}},"description":""}</script><script type=application/ld+json>{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/clannad.icu\/"},{"@type":"ListItem","position":3,"name":"Blog","item":"https:\/\/clannad.icu\/\/blog\/"},{"@type":"ListItem","position":4,"name":"532834567th","item":"https:\/\/clannad.icu\/\/blog\/532834567\/"}]}</script><meta name=theme-color content="#fff"><link rel=apple-touch-icon sizes=180x180 href=https://clannad.icu/apple-touch-icon.png><link rel=icon type=image/png sizes=32x32 href=https://clannad.icu/favicon-32x32.png><link rel=icon type=image/png sizes=16x16 href=https://clannad.icu/favicon-16x16.png><link rel=manifest href=https://clannad.icu/site.webmanifest></head><body class="blog single"><div class="header-bar fixed-top"></div><header class="navbar fixed-top navbar-expand-md navbar-light"><div class=container><input class="menu-btn order-0" type=checkbox id=menu-btn> | ||
<label class="menu-icon d-md-none" for=menu-btn><span class=navicon></span></label><a class="navbar-brand order-1 order-md-0 me-auto" href=https://clannad.icu/>CL</a> | ||
<button id=mode class="btn btn-link order-2 order-md-4" type=button aria-label="Toggle mode"> | ||
<span class=toggle-dark><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg></span><span class=toggle-light><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg></span></button><ul class="navbar-nav social-nav order-3 order-md-5"><li class=nav-item><a class=nav-link href=https://github.com/CLannadZSY><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-github"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37.0 00-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44.0 0020 4.77 5.07 5.07.0 0019.91 1S18.73.65 16 2.48a13.38 13.38.0 00-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07.0 005 4.77 5.44 5.44.0 003.5 8.55c0 5.42 3.3 6.61 6.44 7A3.37 3.37.0 009 18.13V22"/></svg><span class="ms-2 visually-hidden">GitHub</span></a></li></ul><div class="collapse navbar-collapse order-4 order-md-1"><ul class="navbar-nav main-nav me-auto order-5 order-md-2"><li class="nav-item active"><a class=nav-link href=https://clannad.icu/blog/>Blog</a></li></ul><div class="break order-6 d-md-none"></div><form class="navbar-form flex-grow-1 order-7 order-md-3"><input id=userinput class="form-control is-search" type=search placeholder="Search docs..." aria-label="Search docs..." autocomplete=off><div id=suggestions class="shadow bg-white rounded"></div></form></div></div></header><div class="wrap container" role=document><div class=content><div align=center><script async src=https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js></script><ins class=adsbygoogle style=display:block data-ad-client=ca-pub-7158791715796373 data-ad-slot=4686887066 data-ad-format=auto data-full-width-responsive=true></ins><script>(adsbygoogle=window.adsbygoogle||[]).push({})</script></div><div class="row justify-content-center"><div class="col-md-12 col-lg-10 col-xl-8"><article><div class=blog-header><h1>在 HTTPS 端口使用 SSH</h1><p><small>Posted May 22, 2024 by | ||
<a class="stretched-link position-relative" href=https://clannad.icu/contributors/clannadzsy/>clannadzsy</a> | ||
‐ | ||
<strong>1 min read</strong></small><p></div><p class=lead></p><p>在 HTTPS 端口使用 SSH | ||
有时,防火墙会完全拒绝允许 SSH 连接。 如果无法选择使用具有凭据缓存的 HTTPS 克隆,可以尝试使用通过 HTTPS 端口建立的 SSH 连接克隆。 大多数防火墙规则应允许此操作,但代理服务器可能会干扰</p><p>GitHub Enterprise Server 用户:目前不支持经 SSH 通过 HTTPS 端口访问 GitHub Enterprise Server。</p><p>要测试通过 HTTPS 端口的 SSH 是否可行,请运行以下 SSH 命令:</p><pre><code class=language-bash>$ ssh -T -p 443 [email protected] | ||
> Hi USERNAME! You've successfully authenticated, but GitHub does not | ||
> provide shell access. | ||
</code></pre><p>注意:端口 443 的主机名为 ssh.,而不是 ``。</p><p>如果这样有效,万事大吉! 否则,可能需要遵循我们的故障排除指南。</p><p>现在,若要克隆存储库,可以运行以下命令:</p><pre><code class=language-bash>git clone ssh://git@ssh.:443/YOUR-USERNAME/YOUR-REPOSITORY.git | ||
</code></pre><p>启用通过 HTTPS 的 SSH 连接 | ||
如果你能在端口 443 上通过 SSH 连接到 git@ssh.,则可覆盖你的 SSH 设置来强制与 GitHub.com 的任何连接均通过该服务器和端口运行。</p><p>要在 SSH 配置文件中设置此行为,请在 ~/.ssh/config 编辑该文件,并添加以下部分:</p><pre><code class=language-bash>Host | ||
Hostname ssh. | ||
Port 443 | ||
User git | ||
</code></pre><p>你可以通过再次连接到 GitHub.com 来测试这是否有效:</p><pre><code class=language-bash>$ ssh -T git@ | ||
> Hi USERNAME! You've successfully authenticated, but GitHub does not | ||
> provide shell access. | ||
</code></pre><p>更新已知主机 | ||
在切换到端口 443 后第一次与 GitHub 交互时,你可能会收到一条警告消息,指出在 known_hosts 中找不到主机,或者该主机由其他名称找到。</p><blockquote><p>The authenticity of host ‘[ssh.github.com]:443 ([140.82.112.36]:443)’ can’t be established. | ||
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU. | ||
This host key is known by the following other names/addresses: | ||
~/.ssh/known_hosts:32: github.com | ||
Are you sure you want to continue connecting (yes/no/[fingerprint])?</p></blockquote><p>假设 SSH 指纹与 GitHub 发布的指纹之一匹配,那么可以针对这个问题安全地回答“是”。 有关指纹列表,请参阅“GitHub 的 SSH 密钥指纹”。</p><p>来源: <a href=https://docs.github.com/zh/authentication/troubleshooting-ssh/using-ssh-over-the-https-port>在 HTTPS 端口使用 SSH</a></p></article></div></div><script src=https://utteranc.es/client.js repo=CLannadZSY/clannadzsy.github.io issue-term=title theme=github-light crossorigin=anonymous async></script></div></div><footer class="footer text-muted"><div class=container><div class=row><div class="col-lg-8 order-last order-lg-first"><ul class=list-inline><li class=list-inline-item>Copyright © 2020-present <a href=https://github.com/CLannadZSY/>clannadzsy</a></li></ul></div><div class="col-lg-8 order-first order-lg-last text-lg-end"><ul class=list-inline></ul></div></div></div></footer><script src=https://clannad.icu/js/highlight.min.2c793eb7599ae4975966407f455873eca25c0dd1146f2ba6a8ca933c3ee5a244f8e3a48c5b73694a76709db65ff3e7eedf2a55fc3b0c03510b2eca2b8635c8da.js integrity="sha512-LHk+t1ma5JdZZkB/RVhz7KJcDdEUbyumqMqTPD7lokT446SMW3NpSnZwnbZf8+fu3ypV/DsMA1ELLsorhjXI2g==" crossorigin=anonymous defer></script><script src=https://clannad.icu/main.min.7ab523108435955765bcb88a0ee704f412ba01646b5478e84f3b9feb24f0ce750a14c3f7bd9a62408fe21e41996d361a9eb29f77e85dfe77b7e17f7623bd3a97.js integrity="sha512-erUjEIQ1lVdlvLiKDucE9BK6AWRrVHjoTzuf6yTwznUKFMP3vZpiQI/iHkGZbTYanrKfd+hd/ne34X92I706lw==" crossorigin=anonymous defer></script><script src=https://clannad.icu/index.min.2ab4b3ba0de0d49f020a532eda219cbbae89f190caed914c8e9e8d0b0022a730fed8c6d6fbb9ad71f5a0ffab295a9fa0dd4410e342625571c9a7be78084cc899.js integrity="sha512-KrSzug3g1J8CClMu2iGcu66J8ZDK7ZFMjp6NCwAipzD+2MbW+7mtcfWg/6spWp+g3UQQ40JiVXHJp754CEzImQ==" crossorigin=anonymous defer></script></body></html> |
Oops, something went wrong.