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

improve git http authentication via repository configuration #5581

Merged
merged 3 commits into from
May 10, 2022

Commits on May 10, 2022

  1. replace Factory.create_config() w/ Config.create()

    Prior to this change when `Config` was initialised for non-command use,
    user `config.toml` and `auth.toml` files were not loaded. This caused
    unintended side effects when configuration look up were performed from
    the `Authenticator` and other parts of the code.
    abn committed May 10, 2022
    Configuration menu
    Copy the full SHA
    617c81e View commit details
    Browse the repository at this point in the history
  2. ensure git repository authn uses exact urls

    Since git repository authentication is a special case of repository
    configuration, the existing assumptions around path matching do not
    apply. In order to prevent unexpected behaviour due to similar path
    matching, git authentication will use exact url matching.
    abn committed May 10, 2022
    Configuration menu
    Copy the full SHA
    9924e73 View commit details
    Browse the repository at this point in the history
  3. git: ignore http auth for ssh url

    This change ensures that http-basic auth credentials are only passed to
    dulwich when the remote url uses http/https schemes.
    
    In addition to the above, it is now ensured that username/password
    parameters are not passed through to dulwich unless both username and
    password are configured explicitly. This is to ensure that dulwich does
    not bail out if it detects a username in the url
    (eg: `ssh://git@github.com`).
    abn committed May 10, 2022
    Configuration menu
    Copy the full SHA
    a2c1264 View commit details
    Browse the repository at this point in the history