Authentication

This commit is contained in:
2026-08-13 21:53:46 +02:00
parent 9f2e4b2bcc
commit c0bfc3485b
6 changed files with 109 additions and 51 deletions
+9 -7
View File
@@ -329,8 +329,7 @@ the @racket[exn:fail:git-auth] exception.
The callback returns a true value when it has handled authentication and the
original Git command should be tried again. A command is retried at most once.
The default callback returns @racket[#f], preserving the normal Git error
behavior.
The default callback is @racket[default-git-authentication-handler].
@racketblock[
(current-git-authentication-handler
@@ -370,11 +369,14 @@ failed Git process.
[args list?]
[e exn:fail:git-auth?])
boolean?]{
Handles one authentication failure. An existing Git credential helper is tried
first. If no helper is configured, git-cli requests a username and
password/token using @racket[input-prompt], configures Git's non-persistent
@tt{cache} credential helper locally, approves the credential, and returns
@racket[#t] so the original command can be retried once.
Handles one authentication failure. A credential that already failed is first
rejected. An existing Git credential helper is then asked for a replacement
credential. If that does not succeed, git-cli requests a username and
password/token using @racket[input-prompt]. Its @racket[#:loop-until] callbacks
both validate the input and return the value that is used. If no helper is
configured, Git's non-persistent @tt{cache} helper is configured locally before
the credential is approved. The original command is retried once; a credential
that fails on the retry is rejected before the Git error is raised.
}
@defparam[current-git-authentication-handler handler procedure?]{