Visual Studio Code is always asking for Git credentials

I started using Visual Studio Code, and I was trying to save my test project into GitHub, but Visual Studio Code is always asking for my GitHub credentials.

I have installed in my PC GitHub Desktop and also Git. I already ran:

 git config --global credential.helper wincred

but still Visual Studio Code is asking for the credentials.

How can I fix this?

Here is my .gitconfig file located in the user profile folfer:

    [filter "lfs"]
    clean = git-lfs clean %f
    smudge = git-lfs smudge %f
    required = true
[user]
    name = ddieppa
[user]
    email = [email protected]
[credential]
    helper = wincred

Here is the popup windows asking for the credentials:

Enter image description here

I enter my GitHub credentials in the popup, but still getting this error in the Git output window in Visual Studio Code:

remote: Anonymous access to ddieppa/LineOfBizApp.git denied.
fatal: Authentication failed for 'https://github.com/ddieppa/LineOfBizApp.git/'

28 Answers
28

Leave a Comment