Skip to content

Running "dvc pull" now requires authentication #4147

Closed

Description

@seisman

The Contributors' guides (https://www.pygmt.org/dev/contributing.html#using-data-version-control-dvc-to-manage-test-images) mention that:

To pull or sync files from the dvc remote to your local repository, use the commands below.

dvc status  # should report any files 'not_in_cache'
dvc pull  # pull down files from DVC remote cache (fetch + checkout)

To push or sync changes from your local repository up to the dvc remote at DAGsHub, you will first need to set up authentication using the commands below.

dvc remote modify upstream --local auth basic
dvc remote modify upstream --local user "$DAGSHUB_USER"
dvc remote modify upstream --local password "$DAGSHUB_PASS"

So, previously, authentication is not required when running dvc pull, but is required for dvc push. It makes sense for a public DVC repository like pygmt or gmt.

However, it appears that dvc pull requires authentication recently, which causes issues such as #4078 and creates additional barriers for contributors (e.g.,
GenericMappingTools/gmt#8807 and #4135 (review)).

It's unclear if the authentication changes are intentional or not.

Activity

  1. added
    maintenanceBoring but important stuff for the core devs
    on Oct 9, 2025
  2. joa-quim commented on Oct 9, 2025

    @joa-quim
  3. seisman commented on Oct 9, 2025

    @seisman
    Author
  4. joa-quim commented on Oct 9, 2025

    @joa-quim
  5. joa-quim commented on Oct 9, 2025

    @joa-quim
  6. seisman commented on Oct 9, 2025

    @seisman
    MemberAuthor

    In CI, we use a DagsHub token to pull baseline images from DagsHub, but it seems the token can't be used in PRs from forks.

  7. joa-quim commented on Oct 9, 2025

    @joa-quim
  8. weiji14 commented on Oct 10, 2025

    @weiji14
    Member

    it seems the token can't be used in PRs from forks.

    From https://2i2c.org/blog/2025/github-action-secrets-forked-repositories (2i2c-org/2i2c-org.github.io#503), it sounds like there are two options:

    1. Use pull_request_target (not secure)
    2. Use GitHub environments to allow forks to access non-critical secrets

    Let's go with 2 I think, see executablebooks/github-activity#134 for an example implementation, where environment: pr-tests is set in the GitHub Actions.

  9. weiji14 commented on Oct 13, 2025

    @weiji14
    Member

    Option 3 from @seisman in #4148 (comment)

    Actually I'm wondering if we could create a resuable workflow (xref: https://docs.github.com/en/actions/how-tos/reuse-automations/reuse-workflows) that runs the dvc pull commmand, stores the .dvc/cache directory as a cache or artifact, and then other workflows can download the artifact from GitHub, rather than from DagsHub.

  10. seisman commented on Oct 14, 2025

    @seisman
    MemberAuthor

    Maybe it's a DagsHub bug? PyGMT on DagsHub is a public repository. I see no reason why authentication is required for dvc pull operation.

  11. weiji14 commented on Oct 14, 2025

    @weiji14
    Member

    Yeah, it's weird because I also need to log in now to see https://dagshub.com/GenericMappingTools/pygmt, though the repo should be public according to the settings. Not sure where we can report this.

  12. weiji14 commented on Mar 19, 2026

    @weiji14
    Member

    FYI, the noisy deployment messages we saw in #4148 can be turned off now if I'm correctly reading https://github.blog/changelog/2026-03-19-github-actions-late-march-2026-updates/#github-actions-now-allows-developers-to-use-environments-without-auto-deployment, so we could potentially revisit option 2. Or if we're happy with the cache implementation (option 3), maybe ok to close this?

  13. seisman commented on Mar 20, 2026

    @seisman
    MemberAuthor

    Yes, revisiting option 2 sounds good.

  14. weiji14 commented on Mar 20, 2026

    @weiji14
    Member

    Ok, let me revert the reverted PR 😆

  15. weiji14 commented on Mar 24, 2026

    @weiji14
    Member

    To summarize from #4462 (comment), Option 2 still doesn't work without using pull_request_target trigger (which we decided against for security reasons). But ok to keep #4457 for now.

  16. added this to the 0.20.0 milestone on Jul 21, 2026
  17. seisman commented on Jul 21, 2026

    @seisman
    MemberAuthor

    No longer an issue after #4738. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceBoring but important stuff for the core devs

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions