Skip to content

Support standard HTTP authentication protocol for basic authentication. #26

Description

@simonlsk

Currently, it is possible to manually set authentication to basic, then set user and password as config parameters. This means saving a password in plain text in the config or config.local file, or alternatively use ask_password which is also sub-optimal.

The standard HTTP protocol, which is also used by git, is the following:

  1. Try to access URL (plain request)
  2. Receive 401 with header WWW-Authenticate: Basic realm=<realm>
  3. Locally fetch username and password - preferably store the password in the OS password store (i.e Keychain for MacOS)
  4. Retry to access URL again with basic auth header.

This will make it possible to configure an HTTP remote with a single line
dvc remote add origin https://dagshub.com/user/repo.dvc
And directly be able to run
dvc push -r origin

Activity

  1. guysmoilov commented on Jan 25, 2021

    @guysmoilov

    I would add - this would also make it much easier to implement
    dvc push -r https://my-dvc-remote/ directly,
    without configuring anything, much like how git clone works.

  2. efiop commented on Jan 25, 2021

    @efiop
    Contributor

    Thanks for the feature request, guys! We'll be happy to accept a PR, if anyone feels like contributing 🙂

  3. transferred this issue fromtreeverse/dvcon Jan 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions