How To Fix Error Authentication Failed On The Git Remote

Recently when I use VSCode to clone a git repository to my local computer, I meet the error message Authentication failed on the git remote. This article will tell you how to fix it.

1. Steps To Reproduce The Authentication Failed On The Git Remote Error.

  1. I use bitbucket to save my example code git repository. And in the past, I use SourceTree to manage the git repository.
  2. But recently I transfer my example project to VSCode, and I find I can clone the example project repository using the VSCode editor directly. Below are the steps.
  3. Open a web browser and log in to the bitbucket with your account.
  4. Click the Repositories link on the top area.
  5. Then click the git repository that you want to clone to your local computer.
  6. On the repository detail page, click the Clone button in the top right corner, then it will popup the Clone this repository dialog.
  7. There are 2 link buttons in the dialog, click the Clone in VS Code link.
  8. It will pop up a dialog to ask you whether open the VSCode editor to clone the repository or not.
  9. Click the Open URL:vscode button to start the cloning process.
  10. Click the Open button in the popup Allow an extension to popup this URI dialog.
  11. If this is the first time you use VSCode to clone the git repository, it will prompt you to install some VSCode extensions such as the Git extension.
  12. Then click the Clone a new copy item in the VSCode top area Command Palette… input text box.
  13. Select a folder where you want to save the new git repository.
  14. Then it will let you input the repository password in the VSCode top area Command Palette… input text box.
  15. Input the Git repository password and press the Enter key, then it will show the error message Authentication failed on the git remote.

1. How To Fix The Authentication Failed On The Git Remote Error.

  1. Log in to the bitbucket website with your account.
  2. Click your account image on the page top right corner.
  3. Then click the Personal settings item on the popup item list to open the Personal settings page.
  4. Click the App passwords link on the page left side, then click the Create app password button on the page right side.
  5. Input a name ( vscode ) in the Label input text box, and check all the permission checkboxes ( Read, Write, Admin, Delete ) in the Repositories section.
  6. Click the Create button to create it, then it will popup a dialog and give you a password for the vscode application, store it carefully.
  7. Now you can use the app password that is created above when you clone the git repository in the VSCode editor to avoid the error occur.

Leave a Comment

Your email address will not be published.

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

Clicky