【发布时间】:2020-11-05 09:18:27
【问题描述】:
在尝试更新 git 子模块时,我看到以下错误:
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
我引用了Fatal Error when updating submodule using GIT堆栈溢出帖子,.gitmodules 已经有以下内容:
[submodule "paa"]
path = paa
url = https://github.com/microsoftgraph/paa.git
更新:
根据以下答案,我添加了一个路径,如下所示:
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
我仍然看到同样的错误。我尝试将 .gitmodules 中的内容更新为以下内容:
[submodule "paa"]
path = paa
url = https://<username>:<password>@github.com/microsoftgraph/paa.git
我看到了这个错误:
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
【问题讨论】:
-
证明你实际做了什么来得到这个的证据。 “credential-manager-core”是一个第三方插件,Git 不使用它,你没有展示你使用了什么。
-
只是检查一下,你能进入你的回购并输入
git config -l:你看到有insteadOf的任何设置吗? -
我看到了这个:url.git@github.com:.insteadof=github.com, url.github.com:.insteadof=git@github.com
标签: git github git-submodules