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

Git installs over ssh don't seem to work #12344

Open
Kroppeb opened this issue Mar 20, 2025 · 5 comments
Open

Git installs over ssh don't seem to work #12344

Kroppeb opened this issue Mar 20, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@Kroppeb
Copy link

Kroppeb commented Mar 20, 2025

Summary

I was checking out uv, so I looked at the docs on how to install git dependencies (see here). But it seems to not work for ssh installs?

The docs tell me to add git+ in front of the git clone compatible url, which seems to work if I use the https url, but not for ssh.

examples:

  • uv add git+https://github.com/astral-sh/uv.git => does work
  • uv add [email protected]:astral-sh/uv.git => does not work
  • uv add git+ssh://[email protected]/astral-sh/uv.git => does not work

Platform

Windows 11 x86_64

Version

uv 0.6.8 (c1ef482 2025-03-18)

Python version

Python 3.12.1

@Kroppeb Kroppeb added the bug Something isn't working label Mar 20, 2025
@charliermarsh
Copy link
Member

This works for me without issue:

❯ uv add git+ssh://[email protected]/astral-sh/uv.git
Using CPython 3.13.0
Creating virtual environment at: .venv
Resolved 2 packages in 49ms
    Updated ssh://[email protected]/astral-sh/uv.git (584dd36e46732cd955ec3e984d97a7ba6569c019)
   Building uv @ git+ssh://[email protected]/astral-sh/uv.git@584dd36e46732cd955ec3e984d97a7ba6569c019
⠧ Preparing packages... (0/1)

I suspect there may be an issue in your SSH configuration or similar?

@Kroppeb
Copy link
Author

Kroppeb commented Mar 20, 2025

ugh, my bad. I had converted the [email protected]:astral-sh/uv.git url to and ssh url without changing the : into a /. Realized my mistake while writing the issue and changed the : into a / that time, but then apparently forgot to add the ssh:// 🤦

And I guess [email protected]:astral-sh/uv.git doesn't work, because [email protected]:astral-sh/uv.git is not a url? It is confusing because it is something you can use in a git clone and it's what github gives you if you use the clone button (for ssh). I'm also coming from pipenv which does support this format.

@charliermarsh
Copy link
Member

No worries! Pipenv supports [email protected]:astral-sh/uv.git? Like it assumes ssh?

@Kroppeb
Copy link
Author

Kroppeb commented Mar 20, 2025

Yes it converts them into ssh urls*.

I'm confused about your second question. [email protected]:astral-sh/uv.git is an alternative syntax for ssh.

pipenv's handling of ssh urls is a bit broken and will result in corrupt lock files if no branch, tag or commit is specified.

@charliermarsh
Copy link
Member

Understood! The context for my clarification is: pip install [email protected]:astral-sh/uv.git doesn't work (same for uv pip install) -- they require pip install git+ssh://[email protected]:astral-sh/uv.git (so does uv pip install).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants