为什么当我试图克隆git子模块时git要求我输入用户名和密码?

92dk7w1h  于 2023-02-07  发布在  Git
关注(0)|答案(1)|浏览(600)

我运行了(遵循此存储库https://github.com/UCSD-PL/proverbot9001/issues/74中的说明):

git submodule update --init --recursive --remote

但是得到了终端/git的提示:

Cloning into '/Users/brandomiranda/proverbot9001/coq-projects/VST/coq-ext-lib/coqdocjs'...
Username for 'https://github.com': brando90
Password for 'https://brando90@github.com': 
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/coq-ext-lib/coqdocjs.git/'
fatal: clone of 'https://github.com/coq-ext-lib/coqdocjs.git' into submodule path '/Users/brandomiranda/proverbot9001/coq-projects/VST/coq-ext-lib/coqdocjs' failed
Failed to clone 'coqdocjs'. Retry scheduled
Cloning into '/Users/brandomiranda/proverbot9001/coq-projects/VST/coq-ext-lib/templates'...
Username for 'https://github.com': 
Password for 'https://github.com': 
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/coq-ext-lib/templates.git/'
fatal: clone of 'https://github.com/coq-ext-lib/templates.git' into submodule path '/Users/brandomiranda/proverbot9001/coq-projects/VST/coq-ext-lib/templates' failed
Failed to clone 'templates'. Retry scheduled
Cloning into '/Users/brandomiranda/proverbot9001/coq-projects/VST/coq-ext-lib/coqdocjs'...
Username for 'https://github.com': 
Password for 'https://github.com': 
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/coq-ext-lib/coqdocjs.git/'
fatal: clone of 'https://github.com/coq-ext-lib/coqdocjs.git' into submodule path '/Users/brandomiranda/proverbot9001/coq-projects/VST/coq-ext-lib/coqdocjs' failed
Failed to clone 'coqdocjs' a second time, aborting
fatal: Failed to recurse into submodule path 'coq-projects/VST/coq-ext-lib'

这是应该发生的吗?为什么我会从git收到这个请求?为什么它不能像平常一样拉取git repos并初始化子模块?

r55awzrz

r55awzrz1#

如果其中一个子模块存储库(如coq-ext-lib/coqdocjs.git)是私有的,您需要验证自己的身份,以便GitHub检查您是否有权访问这些存储库。
但是自从Aug. 2021以来,你需要输入一个personal access token作为密码,而不是你实际的GitHub账户密码。
UCSD-PL/proverbot9001/.gitmodules中列出的存储库都不是私有的,但是其中可能有一个包含了一个子模块存储库引用,它指向一个私有存储库。
首先尝试git submodule update --init --remote(* 不带 * --recursive

相关问题