remote: Support for password authentication was removed on August 13, 2021.
Published: 2023-09-29 05:41:07

 
"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`.

   ```bash
   git clone git@github.com:mygithub/myrepo.git
   ```

**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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/55bfdhubw2c56f9ir5vb.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z6nh7bh2zb6nz6oo468o.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q9lb1tighqlvfrb0rb5a.png)








   ```bash
   git clone https://PERSONAL-ACCESS-TOKEN@github.com/mygithub/myrepo.git
   ```

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.

2. **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:

     ```bash
     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.