Skip to content

Git dependencies fetch strategy #1452

Closed
@TheoBabilon

Description

@TheoBabilon

Hi team,

Thanks for the great work on uv!

I have several git dependencies in one of my existing projects; I tried running
uv pip compile pyproject.toml -o requirements.txt but it fails with

Updating ssh://git (github.mycompany.com/toto/abcd.git)                               

error: Failed to download and build: abcd @ git+ssh://[email protected]/toto/abcd.git
  Caused by: Git operation failed
  Caused by: failed to fetch into: /myhomedir/.cache/uv/git-v0/db/f81ed0a494f1ba1c
  Caused by: failed to authenticate when downloading repository

* attempted ssh-agent authentication, but no usernames succeeded: `myusername`, `git`
  Caused by: no authentication methods succeeded

Note that cloning repos works fine from git cli (or even using pdm, though I'm not sure what's the underlying method used).

Looking into #283, I noticed from @charliermarsh comment that this is unfortunately a common problem with ssh deps with Cargo;
looking into the PR it seems that the Cli fetching strategy is handled (which might potentially solve my problem?), but it is unclear to me if this is somehow exposed to us (as end user), through the uv cli?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions