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

dulwich: properly patch credentials #147

Closed
efiop opened this issue Oct 26, 2022 · 2 comments
Closed

dulwich: properly patch credentials #147

efiop opened this issue Oct 26, 2022 · 2 comments
Assignees

Comments

@efiop
Copy link
Contributor

efiop commented Oct 26, 2022

From @dtrifiro

I've had a quick look. Need to fix the clone method in scmrepo.git.backends.dulwich, it doesn't use the GitCredentials client. This needs to also be done in other methods which use get_transport_and_path

iterative/dvc#7670

Looks like we need to copypaste clone(and other) implementations from dulwich and use our client instead of relying on get_transport_and_path.

@dtrifiro dtrifiro self-assigned this Nov 16, 2022
@sisp
Copy link
Collaborator

sisp commented Nov 18, 2022

See iterative/dvc#7670 (comment). This is really a blocker for macOS users. 🙁

@dtrifiro
Copy link
Contributor

My initial observations were not correct, the client is patched correctly and the following code works for private repos which require credential helpers on MacOS:

from scmrepo.git import Git

git = Git(".")
git.clone("https://github.com/dtrifiro/a-private-repo", "a-private-repo")
# or, explicitly using the dulwich backend:
git.dulwich.clone("https://github.com/dtrifiro/a-private-repo", "a-private-repo")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants