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

ls/import/get: introduce --config #9747

Merged
merged 1 commit into from
Jul 20, 2023
Merged

ls/import/get: introduce --config #9747

merged 1 commit into from
Jul 20, 2023

Commits on Jul 20, 2023

  1. ls/import/get: introduce --config

    Adds support for `--config` to all three commands. For `ls` and `get`, it is
    a purely runtime option that will merge the config you provide with target
    repo's configs (similar to how .dvc/config.local works). E.g.
    
    ```
    $ cat myconfig
    [remote "myremote"]
        access_key_id = 12345
        secret_access_key = 98765
    
    $ dvc get https://github.com/efiop/mydataregistry recent-grads.csv --config myconfig
    ```
    
    In case of `dvc import`, the semantics are the same, but the value is also
    recorded in the resulting dvcfile. E.g.
    
    ```
    $ dvc import https://github.com/efiop/mydataregistry recent-grads.csv --config myconfig
    ...
    $ cat recent-grads.csv.dvc
    md5: 85c86eeb3afa6d1f7d11beedc644d28e
    frozen: true
    deps:
    - path: recent-grads.csv
      repo:
        url: https://github.com/efiop/mydataregistry
        config: myconfig
        rev_lock: af22e06bbfe34d62a140437abf32f48b535944a7
    outs:
    - md5: f447e23a170a9f25a7799f069a1ba934
      size: 26872
      hash: md5
      path: recent-grads.csv
    ```
    
    This is the most general and powerful mechanism that we can give, that works
    for everything from reconfiguring your default remote to completely changing
    your remote layout and beyond (will be handy in the future).
    
    Fixes iterative#2466
    efiop committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    61607e5 View commit details
    Browse the repository at this point in the history