1

I get this error when I want to do any operation throught Android Studio Console:

fatal: Authentication failed for (url github repository)

But if I use an git interfaz (in my case I am using Android Studio and Github Desktop) and I make pull or push, works fine, no errors. This error only happens when I use any console (like Visual Studio Console) in my project.

I had cloned again the repository and it didn't work...

This error appeared when I had changed in my computer its HDD to SSD, then I copied again my project folder to my SSD, opened it in Android Studio and the error appeared, but only throught console.

I have tried the 3 first solutions in this post but not worked for me: Git push results in "Authentication Failed"

Someone has idea to solve this?

julio segura
  • 63
  • 1
  • 8
  • Have you tried updating your credentials in the [credential manager](https://cmatskas.com/how-to-update-your-git-credentials-on-windows/)? – Jeff Gruenbaum Sep 27 '20 at 18:42
  • @JeffGruenbaum yes man, I had tried that, but not worked. Moreover I have delete the git credentials and reenter then and also didn't work – julio segura Sep 27 '20 at 23:03

2 Answers2

0

Go to > Control Panel > User Accounts > Credential Manager > Windows Credentials and remove all generic credentials involving Git. With this, you are resetting all the credentials. After resetting, when you git clone your repository again, you will be newly and the securely asked your for username and password instead of Authentication Error and will write the new git-credentials to your Credential Manager for further authentication.

SwissCodeMen
  • 4,222
  • 8
  • 24
  • 34
  • I followed your steps but also didn't works it. When I cloned the repository I put my credentials and the operation was successful, and I can make push and pull throught Android Studio Interface as I could make before, but throught its console shows me the same error – julio segura Sep 28 '20 at 00:11
-1

Finally I got the solution, only we need to put this command in the terminal:

git credential-manager uninstall

And then, when we make pull or push will be requested our credentials, and that's all

julio segura
  • 63
  • 1
  • 8