Skip to content

credential-store: support store for new credentials #215

@mirkolenz

Description

@mirkolenz

Bug Report

Description

When using the git credential manager to manage login information and using https-based remotes in dvc (e.g., dvc import https://github.com/...), the credentials are not properly cached. If I just try to fetch some repo using https, GCM correctly uses the saved credentials. In the case of dvc, the login window appears for every step of the pipeline, meaning I have to sign in three times for a single import. GitHub already warned me that GCM triggered some rate limit for my account because of this. Here is an exemplary terminal output:

Importing '/ (https://github.com/xxx/xxx.git)' -> 'xxx'
Cloning xxx.git|                                                                                                                                                                                                                  |0.00/? [00:00,      ?obj/s]
info: please complete authentication in your browser...
Cloning xxx.git|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| Compressing |876/876 [03:38,    219s/obj]
info: please complete authentication in your browser...
info: please complete authentication in your browser...

The same happens for subsequent runs of dvc pull.

Reproduce

  1. dvc import https://github.com/xxx/xxx.git
  2. sign in with GitHub in the GCM window
  3. sign in again
  4. ...

Expected

Credentials are used without the dialogue popping up at all (just like it does for the regular git commands).

Environment information

Output of dvc doctor:

DVC version: 2.43.1 (brew)
---------------------------------
Platform: Python 3.11.1 on macOS-13.2-x86_64-i386-64bit
Subprojects:
	dvc_data = 0.35.1
	dvc_objects = 0.19.0
	dvc_render = 0.0.17
	dvc_task = 0.1.11
	dvclive = 1.3.3
	scmrepo = 0.1.6
Supports:
	azure (adlfs = 2023.1.0, knack = 0.10.1, azure-identity = 1.12.0),
	gdrive (pydrive2 = 1.15.0),
	gs (gcsfs = 2023.1.0),
	http (aiohttp = 3.8.3, aiohttp-retry = 2.8.3),
	https (aiohttp = 3.8.3, aiohttp-retry = 2.8.3),
	oss (ossfs = 2021.8.0),
	s3 (s3fs = 2023.1.0, boto3 = 1.24.59),
	ssh (sshfs = 2023.1.0),
	webdav (webdav4 = 0.9.8),
	webdavs (webdav4 = 0.9.8),
	webhdfs (fsspec = 2023.1.0)
Cache types: reflink, hardlink, symlink
Cache directory: apfs on /dev/disk1s1s1
Caches: local
Remotes: None
Workspace directory: apfs on /dev/disk1s1s1
Repo: dvc, git

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions