3

I want to clone a repository using HTTPS using Git (Windows), which has been set up to use GCM:

C:\Projects>git config credential.helper
manager

I've already set the username using git config --global user.name <username>.

Now, when I attempt to clone a repository, it just fails without prompting for a username/password:

C:\Projects>git clone <url>
Cloning into '<project>'...
fatal: Authentication failed for '<url>'

How can I make Git ask for my username/password? According to this, Git should prompt for credentials, if GCM cannot find any.

As can be seen from the following image, my Windows Credential Manager is currently empty:

enter image description here

Shuzheng
  • 11,288
  • 20
  • 88
  • 186
  • Does Bassetassen's answer on this question work? https://stackoverflow.com/questions/10054318/how-do-i-provide-a-username-and-password-when-running-git-clone-gitremote-git – Mike Faber Dec 06 '19 at 19:27
  • @MikeFaber - thanks for your suggestion, but no Git still doesn't ask for my password even thus I provide my username: `https://@...` – Shuzheng Dec 07 '19 at 10:59
  • @MikeFaber - It works, if I supply both my username and password as `https://:@...`, but then my password is stored in Git's configuration in plaintext, and I don't want that. – Shuzheng Dec 07 '19 at 11:00
  • I had the exact same issue. GCM seems to be broken pretty bad, google is laden with variations of this issue, dating as far back as 2019. Just do away with GCM, either by uninstalling it or following Jez's instructions here: https://stackoverflow.com/questions/37182847/how-do-i-disable-git-credential-manager-for-windows – Ezequiel Barbosa Jun 15 '21 at 16:25

0 Answers0