GIT : Visual Studio 2017 – resolved the issue – Git failed with a fatal error. could not read Username for ‘https://.visualstudio.com’: terminal prompts disabled?

Hi All,

LIFE IS BEAUTIFUL 🙂 Today is with family member none other than VISUAL STUDIO 🙂 Sharing the details of how the issue is resolved related to connecting with GIT from Visual Studio 2017.

Background:

  • I am working on the one of the Job using CSOM which governs the Teams.
  • Job make sure that every O365 Group has at least two group owners
  • So as usual I started Visual Studio 2017 (bit behind, should us Visual Studio 2019 🙂 ).
  • We are using GIT repository to commit our source code
  • I started syncing the solution and getting an error.
  • I couldn’t login to Git hub.
  • When I was trying with Visual Studio Online, its working perfectly fine 🙂

Issue / Error:

Git failed with a fatal error.
could not read Username for ‘https://<name of my project in GIT>.visualstudio.com’: terminal prompts disabled

I am not only getting the issue while Syncing (Pulling) the changes but then I tried to clone again and same issue as follows

Error encountered while cloning the remote repository: Git failed with a fatal error.
could not read Username for ‘https:// <name of my project in GIT> .visualstudio.com’: terminal prompts disabled

Resolution: Again as usual Google my friend 🙂 Started bit googling and found couple of approaches and tried as well as

Approach 1 : Removing credentials from credential manager. Following are the steps:

  • Go to Control Panel >> User Accounts as
Windows 10  >> Control Panel >> User Accounts
Fig1: Windows 10 >> Control Panel >> User Accounts
  • Click on link “Manage your credentials” from left menu as shown in below Fig2
Windows 10  >> Control Panel >> User Accounts  >> Manage your credentials
Fig2: Windows 10 >> Control Panel >> User Accounts >> Manage your credentials
  • Click on “Windows Credentials” from where we can remove the credentials as shown in below two figures 3 and 4
Windows 10  >> Control Panel >> User Accounts  >> Manage your credentials
Fig3: Windows 10 >> Control Panel >> User Accounts >> Manage your credentials >> My all Windows credentials
Fig4: Windows 10 >> Control Panel >> User Accounts >> Removing credentials
  • But this approach did not worked for me 🙁

Approach 2 : Deleting “Git” folder from the location “C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer“. This approach worked for me 🙂

After successfully deleting “Git” folder, I could successfully log in.

Windows 10  >> Deleting "Git" folder
Fig5: Windows 10 >> Deleting “Git” folder

References:

Thanks for reading 🙂 HAVE A SAFE LIFE 🙂 TAKE CARE 🙂

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.