1

On trying to update git submodule, I see the following error:

Submodule 'paa' (https://github.com/microsoftgraph/paa.git) registered for path 'paa'
Cloning into 'D:/a/1/s/paa'...
git: 'credential-manager-core' is not a git command. See 'git --help'.
fatal: could not read Username for 'https://github.com': terminal prompts disabled
fatal: clone of 'https://github.com/microsoftgraph/paa.git' into submodule path 'D:/a/1/s/paa' failed
Failed to clone 'paa'. Retry scheduled
Cloning into 'D:/a/1/s/paa'...
git: 'credential-manager-core' is not a git command. See 'git --help'.
fatal: could not read Username for 'https://github.com': terminal prompts disabled
fatal: clone of 'https://github.com/microsoftgraph/paa.git' into submodule path 'D:/a/1/s/paa' failed
Failed to clone 'paa' a second time, aborting
##[error]Git submodule update failed with exit code: 1

I referenced Fatal Error when updating submodule using GIT stack overflow post and .gitmodules already has the following content:

[submodule "paa"]
    path = paa
    url = https://github.com/microsoftgraph/paa.git

UPDATE:

Based on below answer I added a PATH as follows:

C:\Program Files\Git\bin
C:\Program Files\Git\cmd
C:\Program Files\Git\usr\bin
C:\Program Files\Git\mingw64\bin
C:\Program Files\Git\mingw64\libexec\git-core

I still see the same error. I tried updating the content in .gitmodules to the following:

[submodule "paa"]
    path = paa
    url = https://<username>:<password>@github.com/microsoftgraph/paa.git

I see this error:

Submodule 'paa' (https://<username>:<password>@github.com/microsoftgraph/paa.git) registered for path 'paa'
Cloning into 'D:/a/1/s/paa'...
fatal: unable to access 'https://<username>:<password>@github.com/microsoftgraph/paa.git/': Could not resolve host: <username>:<password>@github.com
fatal: clone of 'https://<username>:<password>@github.com/microsoftgraph/paa.git' into submodule path 'D:/a/1/s/paa' failed

3
  • 2
    Evidence of what you actually did to get this. "credential-manager-core" is a third-party add-on that stock Git doesn't use, and you didn't show what you did use.
    – jthill
    Commented Oct 30, 2020 at 17:57
  • Just to check, can you go into your repo and type git config -l: do you see any setting with insteadOf in it?
    – VonC
    Commented Nov 5, 2020 at 7:26
  • I see this: [email protected]:.insteadof=github.com, url.github.com:[email protected]
    – user989988
    Commented Nov 5, 2020 at 19:27

1 Answer 1

2

For all my recent (2.29) Windows Git installations, I had to add %GH%\mingw64\libexec\git-core to my PATH (GH is the path where Git is installed).
See VonC/setupsenv commit f1a1dcd as an example:

set PATH=%GH%\bin;%GH%\cmd;%GH%\usr\bin;
set PATH=%GH%\mingw64\bin;%GH%\mingw64\libexec\git-core;%PATH%
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

That way, the GCM (Microsoft Git-Credential-Manager-Core becomes available and the error message is no more.

10
  • 1
    Thank you! Question - I have Git installed in C:\Program Files. I added paths as you suggested (please see my updated question) and I still see same error. What am I missing?
    – user989988
    Commented Nov 3, 2020 at 0:09
  • @user989988 What does return the command where git-credential-manager-core. And what version of Git for Windows are you using?
    – VonC
    Commented Nov 3, 2020 at 7:15
  • It returns nothing when I run the command where git-credential-manager-core. PS C:\Users\alias> where git-credential-manager-core PS C:\Users\alias> Git version is git version 2.29.2.windows.1
    – user989988
    Commented Nov 3, 2020 at 15:53
  • @user989988 Exactly: the PATH has not been set properly. Try and set it globally in your User environment variables, then open a new CMD/Powershell session, and try again.
    – VonC
    Commented Nov 3, 2020 at 15:59
  • Makes sense - the procedure I did to set PATH is open Control Panel\System and Security\System-> Advanced system settings -> Environment variables -> Path -> Edit -> add all the paths. Could you please confirm if that's the right way? On running git config --list --show-origin, I see credential.helper=wincred
    – user989988
    Commented Nov 3, 2020 at 19:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.