-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
dvc.api.DVCFileSystem
Can not set credentials
#9154
Comments
@PythonFZ Seems like you have a repo locally already, so why not just use |
I only used the local repository as a template to get the correct |
Sorry, looks like I'm missing some context here, but have you tried passing |
@efiop, we don't support passing |
Ah, right, that's a url. Thanks for clarifying! |
@efiop is this still |
We discussed this with @dberenbaum in #4336 as the option to set credentials inside the python API would be very useful for integration with Databricks. The use-case is this - with a lot of our customers, Databricks notebooks are used as a prototyping environment. It would be great if the users could make use of a data registry even as they are prototyping. However, in order to do that it would be necessary to store credentials (say to an S3 or azure blobstorage) in the repository itself (Databricks has a feature called "Repos" which basically clones a repository from GitHub/GitLab to a "local" Databricks environment. Normally, one would set config.local for storing such credentials, but this environment is not really local and keeping credentials in plain text there is similar to keeping them versioned by git. So the way I would like to use this feature is by storing the credentials as databricks secrets (where they are already kept anyway when one wants databricks to communicated with cloud storage) and then passing them to DVC through the API inside of a script. Without that, there is no secure way (that I can see) to make use of a data registry from inside Databricks Repos. |
Tried it myself and it indeed works now, for example:
|
@PythonFZ @tibor-mach Please let us know how it works for you. Thank you again for the request! |
For the record: will upadate docs along with ones for #9610 |
Bug Report
Description
I want to use the
DVCFileSystem
with custom credentials.Ideally, I want to be able to go to any directory and use Python to load a File from a DVC repository.
@skshetry suggested that I could - for now - patch the credentials using:
unfortunatley when I use the following I get
NoCredentialsError
altough I moved the credentials tofs.repo.config
The text was updated successfully, but these errors were encountered: