DEV Community

khaled-17
khaled-17

Posted on

remote: Support for password authentication was removed on August 13, 2021.

"It seems that you encountered an issue with the authentication process when trying to download the project from GitHub using an HTTPS connection. This issue occurred after August 13, 2021, when GitHub removed support for password authentication over HTTPS for security reasons.

To solve this problem and download the project, you can use one of the following methods:

1. Use an SSH connection (the most secure option):
If you have an SSH key on your server and linked to your GitHub account, you can use an SSH connection instead of HTTPS. Here's what to do:

  • Make sure you have an SSH key on your Linux server.
  • Add your public SSH key (located in ~/.ssh/id_rsa.pub) to your GitHub account through your account settings.
  • Then, copy the project's link using SSH (starts with git@github.com) and use it for cloning using git clone.
   git clone git@github.com:mygithub/myrepo.git
Enter fullscreen mode Exit fullscreen mode

2. Use a Personal Access Token:

You can create a Personal Access Token from your GitHub account and use it as a password instead of your account password. Here's how to create the token and use it in the git clone command:

  • Create a Personal Access Token from your GitHub account settings.
  • Then, use the token instead of the password when using HTTPS. You will still be asked for your username as usual, but use the token as the password.

Image description

Image description

Image description

   git clone https://PERSONAL-ACCESS-TOKEN@github.com/mygithub/myrepo.git
Enter fullscreen mode Exit fullscreen mode

By using one of the two options above, you should be able to successfully download the project from GitHub to your Linux server."


To use a Personal Access Token from GitHub as a password instead of your account password when using HTTPS, you can follow the following steps:

  1. Create a Personal Access Token:
  • Log in to your GitHub account.

  • Go to your GitHub account settings.

  • Navigate to the "Developer settings" section from the left sidebar.

  • Select "Personal access tokens" from the options.

  • Click on "Generate token" to create a new Personal Access Token.

  • Choose the permissions you need for your project (such as read and write access to repositories), then click "Generate token."

  • A page with your Personal Access Token will appear. Copy this token. This will be your only chance to see the full token, so make sure to save it in a secure place.

  1. Use the Personal Access Token when using Git:
  • When cloning a project from GitHub using the git clone command, include the Personal Access Token in the URL.

  • Replace PERSONAL-ACCESS-TOKEN with the Personal Access Token you created in the previous step.

  • Use the following command:

     git clone https://PERSONAL-ACCESS-TOKEN@github.com/mygitacount/myrepo.git
    
  • GitHub will prompt you for the username as usual, but in the password field, use the Personal Access Token you created.

This way, you can use the Personal Access Token for authentication when interacting with GitHub projects over HTTPS instead of using your account password. This enhances security and maintains the confidentiality of your account information.

Top comments (0)