linuxwindowsgitauthenticationpush

Git is asking for another mode of authentication in Linux meanwhile Git in Windows push is done correctly


I have a public repo on GitHub which I've cloned to my Windows(Host) and my VM with Ubuntu. I tried to push some changes from my Ubuntu VM and I'm getting the following

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/<username>/<repo>.git/'

Meanwhile from my Windows command line the push it's done correctly using the user and password authentication method

I've checked the .gitconfig and both are configured correctly. Also I've checked the git versions because I think maybe I was using an older version in my windows but it's not the case

My question is: Why from windows is letting me push even when the password authentication method was removed since 2021 and even when the git version is greater than the Linux I've installed on my VM? I haven't found an explanation about this. should I've been asked to user another authentication method from windows machine, isn't?


Solution

  • My question is: Why from windows is letting me push even when the password authentication method was removed since 2021

    It's not actually using the user and password authentication method. It gets an OAuth token through a custom "credential helper" plugin, and then uses that for pushing. Probably this one, which also runs on Linux – but doesn't come built-in on Linux, whereas "Git for Windows" installs it by default.