title: GIT Fatal error: Authentication failed in Visual Studio
body: <p>As of today I'm getting errors when trying to use git commands with my repository in Azure-DevOps. The repositories sit in a project on DevOps that I can access with the same account and shows no sign of any recent changes to it. The steps I can take to reproduce it is:</p>
  
  <ol>
  <li>Open the command prompt and enter <code>git fetch</code></li>
  <li>A window appears prompting for a login
  <a href="https://i.stack.imgur.com/EmWrr.png" rel="noreferrer"><img src="https://i.stack.imgur.com/EmWrr.png" alt="Login"></a></li>
  <li>I click the account</li>
  <li>No password is prompted, but an e-mail arrives that a PAT has been created</li>
  <li>The command prompt yields an error</li>
  </ol>
  
  <p>Error:</p>
  
  <pre><code>fatal: Authentication failed for `&lt;link to repository&gt;`
  </code></pre>
  
  <p>Things I've tried so far:</p>
  
  <ul>
  <li>Restarting PC</li>
  <li>Signing out and in on <code>Visual Studio</code></li>
  <li>Removing the <code>.IdentityService</code> folder</li>
  <li>Removing and installing <code>GIT</code></li>
  <li>Removing and installing <code>GIT For Windows</code> in the <code>Visual Studio Installer</code></li>
  <li>Removing the cache folder <code>%LOCALAPPDATA%\Microsoft\Team Foundation\7.0\Cache</code></li>
  <li>Removing the cache folder <code>%LOCALAPPDATA%\Microsoft\Team Foundation\8.0\Cache</code></li>
  <li>Removing <code>GIT</code> and <code>VS</code> keys from the <code>Credential Manager</code></li>
  <li>Quite a few other things 'fixes' found online that did not solve my issue</li>
  </ul>
  
  <p>Currently running:</p>
  
  <ul>
  <li>GIT 2.21.0-64 bit</li>
  <li>Visual Studio 2019</li>
  </ul>
  
  <p>Edit:</p>
  
  <p>I've attempted using <code>Visual Studio Code</code> with the <code>Azure Repos 1.149.2</code> extension and get the same error. It yields me the Microsoft page to enter my code for device login which it grants, but using <code>git</code> commands give me the same error messages.</p>
  
  <p>I've also had my profile removed from the Azure DevOps environment and re-added without success.</p>