I tried to check-in some code to my github repository after more than 6 months today. I found that normal username and password for authentication does not work anymore. Instead I had to use Personal access token (PAT).
There's a simple step to generate PAT. Keep the code secure in a secure place as it will be required to push the change to the git.
Create a token in github:
1) login to github site.
2) on the top right corner, Click user icon.
3) on the dropdown menu, select Settings.
4) click on Developer settings
5) Select Personal Access token.
6) Click Generate new token. And follow the instruction.
7) select required permissions.
Use token to push code:
1) Open console and locate the source folder. Run the code below:
git push https://<GITHUB_ACCESS_TOKEN>@github.com/<GITHUB_USERNAME>/<REPOSITORY_NAME>.git
Example:git push https://ghp_N4dLdh4feZyO2F4XIt8NufA3056jSU2qlkoi@github.com/sanjeeb/myproject2.git