Error: 'could not read Username for' https://github.com 'while pushing

1

I have an ASP.NET versioned project in GitHub and when trying to do a push the following error is returned:

  

fatal: could not read Username for ' link : terminal prompts disabled

Does anyone have any tips?

    
asked by anonymous 09.05.2018 / 22:47

1 answer

0

This error occurs a> when git needs to ask the user name and password, however the only mechanism to ask for the user and password is the console and there is no console available .

This usually occurs when you are using some software over git (in your case, I believe it would be Visual Studio) and have something incorrect or missing set up in the credentials part.

You can solve the problem as follows:

  • Use gitcredentials and save user / password in Git's own configuration.
  • You can also check how the user is and password if you chose the Windows manager. Thus: Credential Manager - > Windows Credentials - > below Generic Credentials - > update / remove credentials. Example: git: link
  • Use SSH instead of HTTPS by setting an SSH key on your machine and placing it in your Github account.
  • Also there are reports that this error can occur due to software problems that interface with Git (SourceTree, Visual Studio, etc). Try updating it too.
  • If you are not using any tools, use this command on the console and try again to do push :

    / p>
    env GIT_TERMINAL_PROMPT=1
    
        
    17.08.2018 / 16:02