Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] http: reauthenticate on 401 Unauthorized #1521

Closed
wants to merge 1 commit into from

Commits on Jun 11, 2023

  1. [RFC] http: reauthenticate on 401 Unauthorized

    A credential helper may return a bad credential if the user's password
    has changed or a personal access token has expired. The user gets
    an HTTP 401 Unauthorized error. The user invariably retries the command.
    
    To spare the user from retrying the command, in case of HTTP 401
    Unauthorized, call `credential fill` again and reauthenticate. This will
    succeed if a helper generates a fresh credential or the user enters a
    valid password.
    
    Keep current behaviour of asking user for username and password at
    most once. Sanity check that second credential differs from first before
    trying it.
    
    Alternatives considered: add a string 'source' field to credential
    struct that records which helper (or getpass) populated credential.
    
    Signed-off-by: M Hickford <mirth.hickford@gmail.com>
    hickford committed Jun 11, 2023
    Configuration menu
    Copy the full SHA
    5d99b92 View commit details
    Browse the repository at this point in the history