This tutorial is not working for me! (Support for password authentication was removed on August 13, 2021.)

Hello I am following the full stack engineer career path, currently, I am studying the section about Git and GitHub: https://www.codecademy.com/paths/fscj-22-building-interactive-websites/tracks/fscj-22-git-and-github-part-i/modules/wdcp-22-introduction-to-github-beddaab4-bbb4-4be7-ba2d-76e9743caac7/articles/getting-started-git-and-github
I can’t connect my local Git to Github following that tutorial, GitHub no longer supports password authentication, I found on Google how to create a token in my Github profile, but I am stuck I don’t know what to do next.
I am using Windows 11, and WSL with Debian, git is already installed on Debian and working

Perhaps your answer lies in one of these threads (via search):

https://discuss.codecademy.com/search?q=github%20authentication

More specifically,

I am using a MacBook Air so the steps (as I recall) are slightly different than using Windows but codecademy has explained that in the Github tutorial.
My problem was when GitHub stopped accepting a ‘password’ to log in from Git to GitHub. They now require that when prompted for your password you actually enter the ‘Personal Access Token’ (PAT). And that Personal Access Token when created in GitHub MUST be copied immediately and than saved elsewhere on your computer. I elected to save it in both NOTES and in GOOGLE DOCS so it readily available. This Personal Access Token must be pasted (Command + V) when prompted for your ‘password’. Before it was possible to enter an actual password one character at a time. That is no longer possible. Once I did that I was able to use the Git commands to create and save a new GitHub repository, If there is a problem Git will give you some specific error message to indicate what needs to be addressed.

1 Like

I solved it by installing GitHub cli, its way easier, I have another problem now.
When I use: git push -u origin main
I got: error: failed to push some refs to
Do you know how to solve it?

I solved the other error! It was very simple, when I installed GitHub cli on my Debian WSL, it guided me through the steps of saving the token, so it created a new user on my local git, with the same name as my github account, so I had to set the global user.

I am going to give you a tip: install GitHub cli, it will save the token on your computer so you don’t have to copy and paste the token every time, it is a simple command line tool

Lately I’m working to Learn C.
I haven’t been using GiHub much, mostly creating Gists.

I do recall having the same problem though
I think I did:

git pull origin main
git push origin main

or
git pull --rebase origin main
git push origin main

I really enjoyed working with Git and GitHub and solving the problems. Hope this helps

Thanks, this worked for me!

You’re welcome. Glad it worked. :- )