Skip to content

Commit 43f82c2

Browse files
authored
Merge pull request #7938 from deveshks/remove-obsolete-git-urls
Remove VCS urls pertaining to git protocol from docs
2 parents 7b02273 + 8f0dbec commit 43f82c2

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

docs/html/reference/pip_install.rst

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -402,28 +402,34 @@ Git
402402
^^^
403403

404404
pip currently supports cloning over ``git``, ``git+http``, ``git+https``,
405-
``git+ssh``, ``git+git`` and ``git+file``:
405+
``git+ssh``, ``git+git`` and ``git+file``.
406+
407+
.. warning::
408+
409+
Note that the use of ``git``, ``git+git``, and ``git+http`` is discouraged.
410+
The former two use `the Git Protocol`_, which lacks authentication, and HTTP is
411+
insecure due to lack of TLS based encryption.
406412

407413
Here are the supported forms::
408414

409-
[-e] git://git.example.com/MyProject#egg=MyProject
410415
[-e] git+http://git.example.com/MyProject#egg=MyProject
411416
[-e] git+https://git.example.com/MyProject#egg=MyProject
412417
[-e] git+ssh://git.example.com/MyProject#egg=MyProject
413-
[-e] git+git://git.example.com/MyProject#egg=MyProject
414418
[-e] git+file:///home/user/projects/MyProject#egg=MyProject
415419

416420
Passing a branch name, a commit hash, a tag name or a git ref is possible like so::
417421

418-
[-e] git://git.example.com/MyProject.git@master#egg=MyProject
419-
[-e] git://git.example.com/[email protected]#egg=MyProject
420-
[-e] git://git.example.com/MyProject.git@da39a3ee5e6b4b0d3255bfef95601890afd80709#egg=MyProject
421-
[-e] git://git.example.com/MyProject.git@refs/pull/123/head#egg=MyProject
422+
[-e] git+https://git.example.com/MyProject.git@master#egg=MyProject
423+
[-e] git+https://git.example.com/[email protected]#egg=MyProject
424+
[-e] git+https://git.example.com/MyProject.git@da39a3ee5e6b4b0d3255bfef95601890afd80709#egg=MyProject
425+
[-e] git+https://git.example.com/MyProject.git@refs/pull/123/head#egg=MyProject
422426

423427
When passing a commit hash, specifying a full hash is preferable to a partial
424428
hash because a full hash allows pip to operate more efficiently (e.g. by
425429
making fewer network calls).
426430

431+
.. _`the Git Protocol`: https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols
432+
427433
Mercurial
428434
^^^^^^^^^
429435

news/1983.doc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Emphasize that VCS URLs using git, git+git and git+http are insecure due to
2+
lack of authentication and encryption

0 commit comments

Comments
 (0)