0

I ran (following the instructions from this repo https://github.com/UCSD-PL/proverbot9001/issues/74):

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

but got these prompts for the terminal/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'

is this suppose to happen? Why am I getting this request from git? Why can't it just pull the git repos and initialize the submodules as normal?

Charlie Parker
  • 5,884
  • 57
  • 198
  • 323
  • Are the github repositories for those submodules public? `https://github.com/coq-ext-lib/coqdocjs.git/` appears to be private or does not exist. – Brian61354270 Feb 05 '23 at 02:33
  • 1
    You might not have a choice here, but Git submodules kinda suck. You'll run into lots of little problems going down this path. – Evert Feb 05 '23 at 03:16
  • @Evert I don't have a choice :( I appreciate the hint. I discovered gitsubmodules sucked a while ago. Appreciate the advice -- wish I could take it. +1 for good advice. – Charlie Parker Feb 05 '23 at 03:19

1 Answers1

1

If one of those submodule repository (like coq-ext-lib/coqdocjs.git) is private, you would need to authenticate yourself for GitHub to check if you have the right to access those.

But since Aug. 2021, you need to enter a personal access token as a password, not your actual GitHub account password.

None of the repositories listed in UCSD-PL/proverbot9001/.gitmodules are private, but maybe one of them includes itself a submodule repository reference which points to a private repository.

Try first git submodule update --init --remote (without the --recursive)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • why without the `--recursive` flag? – Charlie Parker Feb 05 '23 at 03:04
  • very weird, in the server I am using it **is** pulling the git submodules but when I run it locally it doesn't work. Any suggestions? – Charlie Parker Feb 05 '23 at 03:07
  • 1
    Without recursive to avoid cloning potential private submodule of your declared submodules. – VonC Feb 05 '23 at 03:08
  • perhaps what I should be asking is "how to reset the git submodules state in my local computer". How do I do that? Then perhaps I can try to initialize the submodules correctly. I usually run `git submodule init` 1st followed by `git submodule update --init --remote` (but as this question reveals I am actually not entirely sure if that is correct https://stackoverflow.com/questions/75342383/which-should-be-ran-first-git-submodule-update-or-git-submodule-init in general). – Charlie Parker Feb 05 '23 at 03:09
  • ok that was close! got `fatal: Needed a single revision Unable to find current origin/master revision in submodule path 'coq_serapy'` – Charlie Parker Feb 05 '23 at 03:09
  • didn't work :( `(iit_synthesis) brando9~/proverbot9001 $ git submodule init (iit_synthesis) brando9~/proverbot9001 $ git submodule update --init --remote fatal: Needed a single revision Unable to find current origin/master revision in submodule path 'coq_serapy'` – Charlie Parker Feb 05 '23 at 03:11
  • That's seems a different issue. I'll have to check that in a few hours though. I will be off for a bit. – VonC Feb 05 '23 at 03:13
  • got it. Thanks for the help. Made a separate question to make it easier to track what is up: https://stackoverflow.com/questions/75349905/how-does-one-fix-the-git-submodule-error-fatal-needed-a-single-revision-unable – Charlie Parker Feb 05 '23 at 03:23