Join our Discord Server
Ajeet Raina Ajeet Singh Raina is a former Docker Captain, Community Leader and Distinguished Arm Ambassador. He is a founder of Collabnix blogging site and has authored more than 700+ blogs on Docker, Kubernetes and Cloud-Native Technology. He runs a community Slack of 9800+ members and discord server close to 2600+ members. You can follow him on Twitter(@ajeetsraina).

How to Fix “Support for password authentication was removed” error in GitHub

1 min read

GitHub is a popular platform for version control and collaboration, but in August 2021, GitHub removed support for password authentication for HTTPS URLs. This means that if you try to clone a repository using an HTTPS URL and authenticate with a password, you will receive the following error message: “Support for password authentication was removed on August 13, 2021.” Fortunately, you can fix this issue by switching to a personal access token (PAT) or an SSH URL.

I was trying to push my latest committed code to the remote GitHub repository, but faced the following error message:

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/collabnix/reponew'

To fix the “Support for password authentication was removed” error in GitHub, you need to switch to using a personal access token (PAT) instead of a password for authentication. Here are the steps to follow:

Option 1: Use a Personal Access Token (PAT)

Step 1. Create a personal access token (PAT) on GitHub

Login to your GitHub account. Go to Settings.

Image1

Step 2. Generate a new token

Select “Developer settings,” and then “Personal access tokens.”

Image2

Next, you need to generate a new token by selecting the “Generate new token” button. Give your token a name and select the scopes you need. For cloning repositories, you need to select the “repo” scope.

Image3

Step 3. Copy the token to your clipboard.

When prompted for your GitHub credentials while cloning a repository using an HTTPS URL, paste your PAT as your password.

Option 2: Use an SSH URL

Alternatively, you can configure Git to use your PAT for all future interactions with GitHub by running the following command in your terminal:

git config --global credential.helper store

This command will save your credentials to a local file, so you don’t have to enter them every time you interact with GitHub. You can then enter your GitHub username as usual, and your PAT as your password.

Keep in mind that using an SSH URL to clone a repository is a more secure and recommended option, as it allows you to authenticate using your SSH key instead of a password or PAT.

Further Reading

  • Testcontainers and Playwright

    Testcontainers and Playwright

    Discover how Testcontainers-Playwright simplifies browser automation and testing without local Playwright installations. Learn about its features, limitations, compatibility, and usage with code examples.

  • Docker and Wasm Containers – Better Together

    Docker and Wasm Containers – Better Together

    Learn how Docker Desktop and CLI both manages Linux containers and Wasm containers side by side.

  • All Things Cloud Native Meetup: Join Us in Bengaluru! 🌟

    All Things Cloud Native Meetup: Join Us in Bengaluru! 🌟

    Are you passionate about Cloud-Native technologies? Do you enjoy exploring topics like Docker, Kubernetes, GitOps, and cloud transformation? Then mark your calendars! Devtron, Nokia, and Collabnix are collaborating to host “All Things Cloud-Native,” an extraordinary gathering for cloud-native enthusiasts, technologists, and DevOps experts. It’s an opportunity to immerse yourself in the latest trends, tools, and…

  • How Do Coaxial Pogo Pins Differ from Standard Pogo Pins?

    How Do Coaxial Pogo Pins Differ from Standard Pogo Pins?

    In the world of electronics, connectors play a critical role in ensuring seamless communication between components. Among these connectors, pogo pins stand out as versatile and reliable solutions, offering both flexibility and precision. Within the pogo pin category, two primary types are commonly discussed: standard pogo pins and coaxial pogo pins. While they share similarities…

  • How SAST Enhances DevOps Pipeline Security

    How SAST Enhances DevOps Pipeline Security

    Static Application Security Testing (SAST) plays a crucial role in enhancing the security of DevOps pipelines. By integrating SAST early in the development process, teams can identify vulnerabilities right within developers’ integrated development environments (IDEs). This proactive approach allows for faster remediation and reduces the likelihood of security issues appearing later in the pipeline. While…

Have Queries? Join https://launchpass.com/collabnix

Ajeet Raina Ajeet Singh Raina is a former Docker Captain, Community Leader and Distinguished Arm Ambassador. He is a founder of Collabnix blogging site and has authored more than 700+ blogs on Docker, Kubernetes and Cloud-Native Technology. He runs a community Slack of 9800+ members and discord server close to 2600+ members. You can follow him on Twitter(@ajeetsraina).
Join our Discord Server
Index