There's really a stack of things here...
Cloning: https://github.com/MISSPELLED-ORG-OR-REPO-PATH
Is an informational message from tools.gitlibs, I think that's ok.
Error building classpath. Unable to clone /home/user/.gitlibs/_repos/https/github.com/MISSPELLED-ORG-OR-REPO-PATH
fatal: could not read Username for 'https://github.com': terminal prompts disabled
This is actually an error turducken combining info from three places:
1. "Error building classpath" is from the Clojure CLI catching an unexpected error floating out of classpath construction - it doesn't know what happened, just something bad, so very generic.
2. The "Unable to clone " part is from tools.gitlibs when it gets an error from shelling out to git,and I agree that it would make more sense to list at least the git url or maybe both url and path there (can be errors with read/write perms on the path too). I will update that for next release.
3. The "fatal: ..." is from git itself basically saying that it tried to authenticate a repository url (https so http auth) but terminal prompts are disabled so it could not do that. I think you will get better errors if you are authenticated about invalid repo at that point.
I am curious what you see for echo $GIT_TERMINAL_PROMPT
before the CLI call - is this set to 0 in your environment for some reason?
Similarly, if you can authenticate to github before running the CLI command, you should be seeing either success or a better error.
You can replicate this scenario at the terminal by:
- Logging out of github:
gh auth logout
(presumably you are already logged out here).
- Turning off terminal prompts:
export GIT_TERMINAL_PROMPT=0
- Issuing the command:
git clone --quiet --mirror https://github.com/ANY-ORG/ANY-REPO foo
:
fatal: could not read Username for 'https://github.com': terminal prompts disabled