[Solved] The unauthenticated git protocol on port 9418 is no longer supported

Since January 11, 2022, GitHub has stopped accepting the deprecated key and signature types, ciphers, MACs, and the unencrypted Git protocol. Hence if you are using any of these, you will get an error stating The unauthenticated git protocol on port 9418 is no longer supported.

In this tutorial, we will learn what precisely the unauthenticated git protocol on port 9418 is no longer supported means and how to resolve this error.

What is the unauthenticated git protocol on port 9418 is no longer supported?

The GitHub official statement states, “This is the full brownout period where we’ll temporarily stop accepting the deprecated key and signature types, ciphers, and MACs, and the unencrypted Git protocol. This will help clients discover lingering uses of older keys or old URLs”.

The permanent shutdown happened on March 15, 2022, and it states, “We’ll permanently stop accepting DSA keys. RSA keys uploaded after the cut-off point above will work only with SHA-2 signatures (but again, RSA keys uploaded before this date will continue to work with SHA-1). The deprecated MACs, ciphers, and unencrypted Git protocol will be permanently disabled”.

How to fix The unauthenticated git protocol on port 9418 is no longer supported?

Solution 1: Changing the Protocol

As we know that the error is due to a change in Improving Git protocol security on GitHub, the easiest way to resolve this issue is by changing the protocol from git to HTTPS, as shown below for all your repositories.

git config --global url."https://github.com/".insteadOf git://github.com/

OR

git config --global url."https://".insteadOf git://

Solution 2: For GitHub Actions

If you are using GitHub Actions to automate workflows such as CI/CD, Automated testing, etc., you need to change the protocol from git to HTTPS, as shown below.

Navigate to your YAML file and add the step before running actions/checkout with submodules: true

   - name: Fix up git URLs
      run: echo -e '[url "https://github.com/"]\n  insteadOf = "git://github.com/"' >> ~/.gitconfig

Solution 3: Change the protocol from git to ssh in case if you are using SHA keys

You can also use SSH, but GitHub Security reminds us that, as of March 15, 2022, GitHub stopped accepting DSA keys. RSA keys uploaded after November 2, 2021, will work only with SHA-2 signatures.

The deprecated MACs, ciphers, and unencrypted Git protocol are permanently disabled.

git config --global url."git@github.com:".insteadOf git://github.com/

The above command will change the protocol from git to SSH git://github.com/ (unencrypted Git protocol) into git@github.com: (SSH URL).

Conclusion

The unauthenticated git protocol on port 9418 is no longer supported occurs because GitHub has stopped accepting the deprecated key and signature types, ciphers, and MACs, and the unencrypted Git protocol from March 15, 2022.

The issue can be resolved by changing the protocol from Git to HTTPS in the .gitconfig. The same approach needs to be implemented in package.json, GitHub Actions too if you are fetching the repository using the git protocol.

Leave a Reply

Your email address will not be published. Required fields are marked *

Sign Up for Our Newsletters

Subscribe to get notified of the latest articles. We will never spam you. Be a part of our ever-growing community.

You May Also Like
Git Remove Untracked Files

Git Remove Untracked Files

Table of Contents Hide Difference between Tracked vs. Untracked Filesgit-clean DocumentationSyntax How to Remove Untracked Files in Git? Starting with a “Dry Run”Deleting Files with the -f Option If you…
View Post