-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Bug Report
Description
When using a HTTP remote with basic authentication and password prompt, dvc status --cloud does not recognize a failed authentication attempt (wrong/missing password) and outputs misleading information. Instead of an error message, DVC lists all my local files as if they do not exist on remote (regardless of whether they were already pushed or not).
In fact, I'm experiencing similar behavior when using dvc pull and, for imported data, dvc update. If the password is incorrect, DVC more or less ignores it and tells me that everything is up-to-date. This is rather problematic in a collaborative setting, since it's easy to mistype a password and miss out on important changes, etc.
Reproduce
Prerequisite: A HTTP remote with basic authentication and ask_password = true
dvc add image.jpgdvc status --cloud(correct password)
new: image.jpg
dvc push(correct password)dvc status --cloud(correct password)
Cache and remote 'myremote' are in sync.
dvc status --cloud(wrong password or no password)
new: image.jpg
Expected
An error message about the failed authentication attempt.
Environment information
Output of dvc doctor:
$ dvc doctor
DVC version: 2.9.3 (pip)
---------------------------------
Platform: Python 3.9.5 on Linux-5.11.0-49-generic-x86_64-with-glibc2.33
Supports:
webhdfs (fsspec = 2021.11.1),
http (aiohttp = 3.7.4.post0, aiohttp-retry = 2.4.6),
https (aiohttp = 3.7.4.post0, aiohttp-retry = 2.4.6),
ssh (sshfs = 2021.11.2)
Cache types: reflink, hardlink, symlink
Cache directory: btrfs on /dev/mapper/home
Caches: local
Remotes: https
Workspace directory: btrfs on /dev/mapper/home
Repo: dvc, gitAdditional Information (if any):
We are using a Nexus system as our HTTP remote. With correct credentials, dvc status, dvc pull, dvc push, etc, works as expected. I don't know how DVC communicates with the HTTP storage, but if I try to fetch a file directly from the Nexus system via cURL and provide wrong credentials, the response is a 401 and so it seems this is something DVC should be able to pick up and react to.
Please let me know if anything is unclear or if you need additional information.