question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dvc import broken authentication

See original GitHub issue

We seem to no longer be able to import a remote dvc resources from a repository that requires authentication. This worked at some point prior to 2.10. This worked previously.

The output of the import is as follows:

2022-06-14 12:01:24,323 ERROR: failed to import 'model.hdf5' from 'https://github.build.company.com/org/Artifacts.git'. - Failed to clone repo 'https://github.build.company.com/org/Artifacts.git' to '/var/tmp/pbs.1540626.scinfra2/tmpc9sse3s9dvc-clone'
------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/scmrepo/git/backend/dulwich/__init__.py", line 196, in clone
    repo = clone_from()
  File "/usr/local/lib/python3.8/dist-packages/dulwich/porcelain.py", line 443, in clone
    return client.clone(
  File "/usr/local/lib/python3.8/dist-packages/dulwich/client.py", line 747, in clone
    result = self.fetch(path, target, progress=progress, depth=depth)
  File "/usr/local/lib/python3.8/dist-packages/dulwich/client.py", line 824, in fetch
    result = self.fetch_pack(
  File "/usr/local/lib/python3.8/dist-packages/dulwich/client.py", line 2079, in fetch_pack
    refs, server_capabilities, url = self._discover_references(
  File "/usr/local/lib/python3.8/dist-packages/dulwich/client.py", line 1938, in _discover_references
    resp, read = self._http_request(url, headers)
  File "/usr/local/lib/python3.8/dist-packages/dulwich/client.py", line 2219, in _http_request
    raise HTTPUnauthorized(resp.getheader("WWW-Authenticate"), url)
dulwich.client.HTTPUnauthorized: No valid credentials provided

The above exception was the direct cause of the following exception:

There was some previous commit appears to fix a similar issue, which was part of the 2.11 release: issue #7670 however, updating to 2.11 did not fix the issue.

DVC version: 2.11.0 (pip)
---------------------------------
Platform: Python 3.8.0 on Linux-3.10.0-1160.66.1.el7.x86_64-x86_64-with-glibc2.27
Supports:
	webhdfs (fsspec = 2022.5.0),
	http (aiohttp = 3.8.1, aiohttp-retry = 2.4.6),
	https (aiohttp = 3.8.1, aiohttp-retry = 2.4.6),
	s3 (s3fs = 2022.5.0, boto3 = 1.21.21)
Cache types: hardlink, symlink
Cache directory: nfs on LEB1MLNAS.hpc.company.com:/leb1mlnas_projects
Caches: local
Remotes: None
Workspace directory: nfs on LEB1MLNAS.hpc.company.com:/leb1mlnas_projects
Repo: dvc, git

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:18 (10 by maintainers)

github_iconTop GitHub Comments

4reactions
dtrifirocommented, Sep 13, 2022

Solved in 2.25.0

2reactions
d-miketacommented, Jul 27, 2022

@dtrifiro FWIW I tried installing dulwich from your feature branch using

pip install git+https://github.com/dtrifiro/dulwich.git@feature/credential-helper

and I’m unfortunately still running into the same issue:

❯ dvc pull data/dataset.dvc
Everything is up to date.                                                                                                                                       
ERROR: failed to pull data from the cloud - Failed to clone repo 'git@bitbucket.org:organisation/datasets.git' to '/var/folders/b1/d587c0_d6hb6ndr4mv24h_gc0000gq/T/tmpu75hs20xdvc-clone'

Downgrading to 2.9 fixes the issue. I’m on macOS.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting | Data Version Control - DVC
DVC can only authenticate with Git remotes using SSH URLs​​ Experiment sharing commands accept a git_remote argument. You may need to authenticate to...
Read more >
DVC imports authentication to blob storage - Stack Overflow
I'm using DVC to track and version data that is stored locally on the file system and in Azure Blob storage. My setup...
Read more >
5.1. Reproducible machine learning analyses: DataLad as DVC
Be mindful: DVC (as DataLad) comes with a range of commands and concepts ... is used to evaluate the trained classifier on the...
Read more >
November '19 DVC❤️Heartbeat - Iterative.ai
Q: When you do a dvc import you get the state of the data in the original repo ... Q: Can DVC be...
Read more >
Manage data with DVC - Jupyter Tutorial 0.9.0
must be versioned. Versioning data for reproducible analysis is a bigger problem than versioning models because of the size of the data. Tools...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found