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:
- Try to access URL (plain request)
- Receive
401 with header WWW-Authenticate: Basic realm=<realm>
- Locally fetch username and password - preferably store the password in the OS password store (i.e Keychain for MacOS)
- 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