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

Support standard HTTP authentication protocol for basic authentication. #26

Open
simonlsk opened this issue Jan 25, 2021 · 2 comments
Open

Comments

@simonlsk
Copy link

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

@guysmoilov
Copy link

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.

@efiop
Copy link
Contributor

efiop commented Jan 25, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants