Skip to content

Support standard HTTP authentication protocol for basic authentication. #26

@simonlsk

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

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