pip: Pip fails to install package using git and short commit hash

  • Pip version: 10.0.0b1
  • Python version: 3.5.2
  • Operating system: Ubuntu 16.04

Description:

Installing a package from a git repository specifying a commit hash using 7 characters. pip shows an error and do not install the package. I expect pip to install the package using the specified commit.

What I’ve run:

pip install git+git://git.myproject.org/MyProject@0abcdef
Collecting git+git://git.myproject.org/MyProject@0abcdef
  Cloning git://git.myproject.org/MyProject (to revision 0abcdef) to /tmp/pip-req-build-xxxxxxxx
  Did not find branch or tag '0abcdef', assuming revision or ref.
fatal: Couldn't find remote ref 0abcdef
Command "git fetch -q git+git://git.myproject.org/MyProject 0abcdef" failed with error code 128 in /tmp/pip-req-build-xxxxxxxxx

The issue seems to be related to this PR https://github.com/pypa/pip/pull/4674

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (12 by maintainers)

Most upvoted comments

Thanks @cjerdonek, that looks pretty good to me. I’ll make a PR.