Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

If GitHub is unreachable, identify whether the failure is a network block, an SSH authentication problem, or missing repository permission before changing anything. When your network permits HTTPS Git traffic, switching an SSH remote to HTTPS is often the simplest fix. If SSH is required and port 22 is blocked, GitHub documents an SSH connection over port 443—but that route can still be blocked by a proxy and is unsupported for some Enterprise deployments. On a managed network, use only a route your organization authorizes.

First identify what is failing

“Blocked” can describe several different failures. The error message and the remote URL help distinguish them; a timeout does not mean the same thing as a rejected SSH key.

What you see What it may indicate Next step
SSH connection times out or cannot connect to github.com on port 22 Network, firewall, or proxy restrictions on SSH traffic Check whether HTTPS Git access is permitted; otherwise test GitHub’s documented SSH endpoint on port 443 if your network allows it.
Permission denied (publickey) SSH authentication failure, not proof of a firewall block Check the SSH user and host, whether a key is being offered, and whether its public key is attached to the intended GitHub account.
HTTPS is blocked or an organization restriction appears A proxy or account-access policy may be preventing access Ask your network or GitHub organization administrator which access route and account are authorized.
TLS certificate error A certificate trust issue; GitHub notes that an out-of-date CA root certificate can prevent pushes and pulls Follow the certificate error path rather than treating it as a port block.

GitHub Docs says connection problems often arise because a firewall, proxy server, corporate network, or other network is configured to block GitHub traffic. See GitHub’s connectivity troubleshooting guide and its SSH public-key troubleshooting steps.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use HTTPS when SSH is the blocked protocol

If your network allows Git over HTTPS and SSH is failing, changing the repository’s remote URL changes the transport Git uses. It does not grant account access, repository write permission, or an exception to an organization’s policy. You still need an authentication method GitHub accepts and permission to push to that repository.

#1 Best Overall
Yubico - Security Key C NFC - Basic Compatibility - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified
  • POWERFUL SECURITY KEY: The Security Key C NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key C NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key C NFC via USB-C and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
  • BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
  1. In your repository directory, check the current remote with git remote -v. If its URL begins with git@github.com: or uses an SSH URL, it is using SSH.

  2. Copy the repository’s HTTPS URL from GitHub’s repository page. It has the form https://github.com/OWNER/REPOSITORY.git.

  3. Replace the remote URL, keeping the existing remote name (commonly origin): git remote set-url origin https://github.com/OWNER/REPOSITORY.git.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    Rank #2
    Yubico - YubiKey 5C NFC - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified - Protect Your Online Accounts
    • POWERFUL SECURITY KEY: The YubiKey 5C NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
    • WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5C NFC secures 100+ of your favorite accounts, including email, password managers, and more
    • FAST & CONVENIENT LOGIN: Plug in your YubiKey 5C NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
    • MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
    • PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts
  4. Verify the change with git remote -v, then try your normal push command. Complete authentication using an approved method if prompted.

GitHub recommends HTTPS as a troubleshooting alternative to SSH when port 22 cannot be reached. Do not put a password or token in the remote URL. The relevant guidance is in GitHub’s connectivity guide.

Test SSH over port 443 if HTTPS is not an option

GitHub documents an SSH endpoint on port 443. The hostname matters: use ssh.github.com, not github.com, for the test. Run:

Rank #3
Yubico - YubiKey 5 NFC - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-A or NFC, FIDO Certified - Protect Your Online Accounts
  • POWERFUL SECURITY KEY: The YubiKey 5 NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
  • WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5 NFC secures 100+ of your favorite accounts, including email, password managers, and more
  • FAST & CONVENIENT LOGIN: Plug in your YubiKey 5 NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
  • MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
  • PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts
ssh -T -p 443 git@ssh.github.com

If SSH authentication succeeds, GitHub’s example response is Hi USERNAME! You've successfully authenticated, but GitHub does not provide shell access. This confirms SSH authentication only; it does not prove you can write to a particular repository.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To route SSH connections addressed to github.com through that endpoint, add this entry to your SSH configuration file, usually ~/.ssh/config:

Host github.com
    Hostname ssh.github.com
    Port 443
    User git

After saving it, Git connections using the usual git@github.com:OWNER/REPOSITORY.git remote will use ssh.github.com on port 443. GitHub also documents this direct clone form: ssh://git@ssh.github.com:443/OWNER/REPOSITORY.git. See GitHub’s SSH-over-the-HTTPS-port instructions.

Rank #4
Yubico - Security Key NFC - Basic Compatibility - Multi-Factor Authentication (MFA) Key, Connect via USB-A or NFC, FIDO Certified
  • POWERFUL SECURITY KEY: The Security Key NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key NFC via USB-A and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
  • BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.

Handle a host-key warning safely

On first connection, SSH may report that the host is not in known_hosts or is known under a different name. Compare the presented fingerprint with GitHub’s published SSH key fingerprints before accepting it. Do not disable host-key checking to get past the warning. GitHub includes this verification guidance in its port 443 SSH instructions.

Know when this route will not work

These limits are listed in GitHub’s SSH-over-port-443 documentation.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When the network is managed by work or school

If you are on a company or school network, ask the network administrator whether the restriction is accidental and what access route is approved. GitHub’s connectivity guidance recommends checking for network rules that block traffic and asking the administrator to allow the necessary access.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some organizations also configure a corporate proxy that restricts authentication by account. GitHub documents this control for supported HTTP(S) requests; Git SSH is handled separately, and administrators can block SSH endpoints or ports. A different port is therefore not a general-purpose or automatically authorized way around a restriction. If the policy is intentional, request an approved route or account rather than trying to evade it. See GitHub’s Enterprise Cloud proxy and network policy documentation.

For a self-hosted GitHub Enterprise Server installation, do not assume GitHub.com hostnames or port-443 SSH behavior apply; the documented SSH-over-443 method excludes Enterprise Server.

Choose the route your network and account allow

Route Use it when Check before relying on it
HTTPS Git SSH is blocked and HTTPS Git traffic is permitted You can authenticate through an accepted method and have write permission.
SSH on port 443 You need SSH, port 22 is blocked, and the network permits the documented endpoint Test ssh.github.com; account for proxy behavior and Enterprise deployment limitations.
Administrator-approved access A company, school, proxy, or account policy is restricting GitHub Confirm the permitted protocol, endpoint, account, and any allow-list change with the administrator.

If neither approved transport works, retain the exact error output and ask the administrator or repository owner to check the network rules, account access, and repository write permission. GitHub’s troubleshooting pages cover connectivity and SSH key rejection.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.