-
Notifications
You must be signed in to change notification settings - Fork 3k
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+SSH dependencies have subtle (yet critical) differences from git clone #2124
Comments
After checking back on the docs, I noticed you can use that form of uri by |
Maybe that only works for public repos? This is for a private repository. |
While this works for If you run If you instead run Perhaps you thought you'd be clever and do something like Is there really no lighter-weight, supported solution for requiring private repos than running your own PyPI? |
Pip wants to know the version before fetching (git clone) the dependency. If we specify the version after the project name in the egg string, in this hacky form:
But, it's too hacky! I think these days it's so reasonable to have a project dependant on the latest version of a branch of some VCS repository, and there should be no need on specifying a dummy version number as a workaround for this purpose. |
Hi guys, Say, for example, that I want to install a specific commit of the project paramiko-expect; for example, https://github.com/fgimian/paramiko-expect/tree/943630ac499284e6441854a9c4ae1e04301bfdd9 Here is what works and what doesn't, using pip 8.1.2 and setuptools 23.1.0:
Note that the Is there something I'm missing here? |
@mgasner @ajmazurie Same issue here… I almost got crazy by spending 3 hours testing all the possibly imaginable combinations for this, and couldn’t find a single one working. Pip is always trying to find the private module on PyPI, which of course doesn’t work. Instead, it should simply install all Of course, installing what I put in |
If you want pip to take |
@xavfernandez |
@ChillarAnand it is, but without any deprecation timeline and available replacement so this is still the way to go. |
soo, there is no way to install a git+https://{url/to/repo}@{branch}#egg={package}-{version} url in setup.py? my understanding was that your module's dependencies should go into setup.py and your pinned-for-release dependencies should go in requirements.txt. But If I cant load first party dependencies in setup.py, this work flow cant be done.. what? Edit, I suppose this workflow is also complicated by the fact that pip doesn't preserve the source uri of its package, so |
Any update on this issue? having the same problem |
@wobeng What problem are you having? The solutions above worked for me |
I have a private package A on github and it requires a private package B on github. When I try to install A, it tries to installs B but stop short with an error saying |
What's the exact situation? What's the string in |
@MaximilianR are you on slack? |
No |
|
Try finishing egg with a number (I know it seems weird!), i.e. I've had success with http, but looks like others have with ssh. This is what works for me: |
That means I will have to hard code token in the setup.py? |
No, you can do |
ok what about when you want to include a private package in requirements.txt? can you use os.environ? |
I'm not sure about that actually, I'd be interested to know what works best there |
I am seeing this exact problem #2124 (comment) While @MaximilianR 's HTTPS solution might work, could someone make it work with SSH? |
Still can't get this working properly. |
We were able to make it work only by using this solution: #3610 (comment) |
I think this can be closed since we’re dropping the “SCP style” URL altogether. Only |
Maybe a little documentation work could alleviate the confusion mentioned by OP?
|
For people facing issues with referring VCS URL in Further, can it be considered a documentation issue? Will it make sense to add a note regarding #2124 (comment) here under VCS support section? Also @uranusjr, why does your comment #2124 (comment) seems to conflict with the currently documented behaviour https://pip.pypa.io/en/stable/reference/pip_install/#git or is there something I am misunderstanding? |
Not sure where the confusion is. The issue is about |
Ok, I was actually confused with this sentence
However, I think then this issue can be closed now. :) |
See #7543 where the |
Just to help out somebody who runs into an issue with git+ssh and stumbles across this thread - |
Reproduction steps:
git clone git@github.com:account/private-pip-package.git
git+ssh://
and suffix it with#egg=private-pip-package
."git+ssh://git@github.com:account/private-pip-package.git#egg=private-pip
fatal: Could not read from remote repository.
instead.ssh git@github.com
works, butssh ssh://git@github.com
fails ...)git+ssh://git@github.com:account/private-pip-package.git#egg=private-pip
it should begit+ssh://git@github.com/account/private-pip-package.git#egg=private-pip
(if you didn't catch that, its github.com/
account instead of github.com:
account)I would propose that a simple note in the failure message, or checking on input, or what have you, about the
:
vs./
would be quite helpful.The text was updated successfully, but these errors were encountered: