Skip to content

Commit a84f80f

Browse files
authored
Docs: mention fine-grained personal access token for GitHub (#12074)
<!-- readthedocs-preview docs start --> --- :books: Documentation previews :books: - User's documentation (`docs`): https://docs--12074.org.readthedocs.build/12074/ <!-- readthedocs-preview docs end --> <!-- readthedocs-preview dev start --> - Developer's documentation (`dev`): https://dev--12074.org.readthedocs.build/12074/ <!-- readthedocs-preview dev end -->
1 parent 83ab64f commit a84f80f

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

docs/user/guides/private-python-packages.rst

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,16 @@ See :doc:`using environment variables in Read the Docs </environment-variables>`
3434
GitHub
3535
~~~~~~
3636

37-
You need to create a personal access token with the ``repo`` scope.
38-
Follow the `GitHub documentation <https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line#creating-a-token>`__
39-
on how to create a personal token.
37+
You need to create a fine-grained personal access token with the ``Contents`` repository permission set to ``Read-only``.
38+
Follow the `GitHub documentation <https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token>`__
39+
on how to create a fine-grained personal access token.
4040

4141
URI example:
4242

4343
.. code::
4444
4545
git+https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/user/project.git@{version}
4646
47-
.. warning::
48-
49-
GitHub doesn't support tokens per repository.
50-
A personal token will grant read and write access to all repositories the user has access to.
51-
You can create a `machine user <https://developer.github.com/v3/guides/managing-deploy-keys/#machine-users>`__
52-
to give read access only to the repositories you need.
53-
5447
GitLab
5548
~~~~~~
5649

0 commit comments

Comments
 (0)