Support installing from Git URLs
See original GitHub issuepip install https://github.com/pypa/pip.git
Downloading/unpacking https://github.com/pypa/pip.git
Downloading pip.git (47Kb): 47Kb downloaded
Cannot unpack file /tmp/pip-54rGHd-unpack/pip.git (downloaded from /tmp/pip-Kc8M8w-build, content-type: text/html; charset=utf-8); cannot detect archive format
Cannot determine archive format of /tmp/pip-Kc8M8w-build
The proposed workaround is to detect if failed URLs ends with .git and try to use git
(or dulwich) to get content from it if everything else fails.
Issue Analytics
- State:
- Created 11 years ago
- Comments:17 (12 by maintainers)
Top Results From Across the Web
Installing from a Git URL - Unity - Manual
Installing from a Git URL · Open the add menu in the Package Manager's toolbar. · The options for adding packages appear.
Read more >Installing from a Git URL - Unity Manual
Installing from a Git URL · Click the add button in the status bar. · The options for adding packages appear. Add package...
Read more >1.5 Getting Started - Installing Git
The most official build is available for download on the Git website. Just go to https://git-scm.com/download/win and the download will start automatically.
Read more >About remote repositories - GitHub Docs
A remote URL is Git's fancy way of saying "the place where your code is stored ... You can also install GitHub CLI...
Read more >How to install an npm package from GitHub directly
There is also support for installing directly from a Gist, Bitbucket, GitLab, ... As of September 2016, installing from vanilla HTTPS GitHub URLs...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If the stack traces are reported then this is the ideal situation. In most cases it won’t. As developers we can only handle known exceptions. If an unknown exception occurs we can only address the issue if the user reports it. Iterating through known requirements establishes a protocol and procedure. If that procedure needs to be readdressed at a later time then that’s what we should do. In this case, requiring git+ for all git URLs is a requirement that is causing a common issue due to the way GitHub has structured their HTTP Secure git clone URLs. It is in our opinion that pip should detect the URL extension and add the VCS information if it is in fact a GitHub URL. @dstufft believes otherwise and we respect his opinion. @pnasrat suggested that user instructions be added. @techtonik confirms that pip should auto-detect. @Ivoz believes that pip accepts too many package types already. We should add functionality not remove it while being explicit in the process. (Note: To us this means that we should readdress pip’s documentation.)
We are working on an internal solution. If we have any pull requests we will certainly initiate those in the future.
Just chucking pip a url and “hoping it will figure out what to do with it after trying x different things” is bad, implicit design, and as already suggested it makes useful error reporting insane. Explicitness is better. I think pip already accepts too many valid formats of package requirements using the single command
pip install <requirement>
- with many different valid forms of what<requirement>
could be, and this is already the cause of many cases where pip will simply print a stack trace instead of a useful error message.Unfortunately there’s obviously backwards compatibility to consider so we don’t have license to rewrite things wholesale.
Then that (ideally) should be fixed first, before adding to the problems it causes. Pull requests welcome.