The error message indicates that you are trying to authenticate to GitHub using a password, but GitHub removed support for password authentication on August 13, 2021. To fix this error, you need to generate a personal access token (PAT) and use that to authenticate to GitHub instead.
To generate a PAT:
- Log in to your GitHub account.
- Click your profile photo in the top right corner of the page, and then click Settings.
- In the left sidebar, click Developer settings.
- In the left sidebar, click Personal access tokens.
- Click Generate new token.
- Give your token a descriptive name.
- Select the scopes that you need for your token. For cloning repositories, you need to select the repo scope.
- Click Generate token.
Once you have generated a PAT, you can use it to authenticate to GitHub by setting the GIT_TOKEN
environment variable to your PAT. For example, on Linux or macOS, you would run the following command:
export GIT_TOKEN=YOUR_PAT
Once you have set the GIT_TOKEN
environment variable, you can clone your repository using the following command:
git clone https://github.com/user/sc-app.git
You should now be able to clone your repository without any errors.
Here are some additional tips for using PATs:
- PATs should be treated as secrets and stored securely.
- You should only generate PATs for the scopes that you need.
- You should review your PATs regularly and revoke any PATs that you are no longer using.
I hope this helps!