Working with private git repos that require a username and token to resolve seems to fail in uv:
uv pip install '{packagename} @ git+https://{username}@github.com/{organization}/{packagename}.git'
Updating https://{username}/ (github.com/{organization}/{packagename}.git)
error: Failed to download and build: {packagename} @ git+https://{username}@github.com/{organization}/{packagename}.git
Caused by: Git operation failed
Caused by: failed to fetch into: /home/user/.cache/uv/git-v0/db/20cbf189775078d1
Caused by: failed to connect to the repository
Caused by: failed to resolve address for {username}: Temporary failure in name resolution; class=Net (12)
pip will read ~/.git-credentials and find the token associated with username and resolve the URL correctly. pip will also accept the token directly using the form pip install '{packagename} @ git+https://{username}:{token}@github.com/{organization}/{packagename}.git', but uv complains about the URL format in this case, trying to interpret token as a port:
thread 'main' panicked at crates/cache-key/src/canonical_url.rs:113:38:
called `Result::unwrap()` on an `Err` value: InvalidPort
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Working with private git repos that require a username and token to resolve seems to fail in
uv:pipwill read~/.git-credentialsand find the token associated withusernameand resolve the URL correctly.pipwill also accept the token directly using the formpip install '{packagename} @ git+https://{username}:{token}@github.com/{organization}/{packagename}.git', butuvcomplains about the URL format in this case, trying to interprettokenas a port: