You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tried importing data from a data registry whose DVC remote is private, i.e. it requires access credentials, using dvc import ..., but it appears the locally configured credentials for this DVC remote are not used. Some brief investigation suggests that the Git-versioned DVC config from the imported repository, which contains the config of the corresponding DVC remote, is not merged with the local config of the project that imports the data.
Project B is a Git repository (for simplicity, a branch) that imports data from Project A.
A GitLab deploy token with scope read_package_registry is used in Project B for pulling data from the private DVC remote associated with Project A.
This is the error I'm getting:
$ dvc import --rev project-a -o project-a-data.txt --no-download [email protected]:sisp/dvc-import-auth-example.git data.txt
Importing 'data.txt ([email protected]:sisp/dvc-import-auth-example.git)' -> 'project-a-data.txt'
$ dvc pull
ERROR: configuration error - HTTP 'custom' authentication require both 'custom_auth_header' and 'password'
ERROR: HTTP 'custom' authentication require both 'custom_auth_header' and 'password'
Learn more about configuration settings at <https://man.dvc.org/remote/modify>.
Expected
DVC should be able to pull the imported data from the DVC remote associated with Project A by using the access credentials configured locally in Project B.
This is the same issue as #4604. dvc import currently does not read the local configuration in project B, it will only use any credentials specified for the default remote in project A.
Closing as duplicate, please follow the linked issue for updates
I see. That's a major blocker though because it makes DVC useless for managing data in private data registries. It's impossible to provide credentials in Project A because they would need to be versioned and that obviously makes no sense.
However, DVC complains when only the credentials of the remote are added to the global config without the URL although the URL is already configured in the versioned config of Project A. This is not a blocker but suboptimal user experience. I understand why DVC complains about the missing URL because it doesn't know at the beginning of the pull command that the URL is configured in the imported Project A and it would have to first clone the Git repo of Project A to retrieve the URL. Still, it's not intuitive and redundant to fully configure the remote of Project A in the global config again.
Bug Report
Description
I've tried importing data from a data registry whose DVC remote is private, i.e. it requires access credentials, using
dvc import ...
, but it appears the locally configured credentials for this DVC remote are not used. Some brief investigation suggests that the Git-versioned DVC config from the imported repository, which contains the config of the corresponding DVC remote, is not merged with the local config of the project that imports the data.Reproduce
I've created a GitHub project that contains a reproducible example: https://github.com/sisp/dvc-import-auth-example
A brief overview:
read_package_registry
is used in Project B for pulling data from the private DVC remote associated with Project A.This is the error I'm getting:
Expected
DVC should be able to pull the imported data from the DVC remote associated with Project A by using the access credentials configured locally in Project B.
Environment information
Output of
dvc doctor
:The text was updated successfully, but these errors were encountered: