-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Guide: using private submodules in rtd.com #6527
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
Changes from 3 commits
d93b252
5ec3b76
c159497
1f4ca88
d69b988
c0de4a8
4303914
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,92 @@ | ||||
Using Private Git Submodules with Read the Docs for Business | ||||
stsewd marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
============================================================ | ||||
|
||||
Read the Docs uses SSH keys (with read only permissions) in order to clone private repositories. | ||||
An SSH key is automatically generated and added to your main repository, but not on your submodules. | ||||
stsewd marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
In order to give Read the Docs access to clone your submodules you'll need to add the public SSH key to each repository of your submodules. | ||||
|
||||
.. note:: | ||||
|
||||
You can manage which submodules Read the Docs should clone using a configuration file. | ||||
See :ref:`config-file/v2:submodules`. | ||||
|
||||
Project's SSH Key | ||||
----------------- | ||||
stsewd marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
You can find the public SSH key of your Read the Docs project by | ||||
|
||||
- Going to the :guilabel:`Admin` tab of your project | ||||
- Click on ``SSH Keys`` | ||||
stsewd marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
- Click on the fingerprint of the SSH key (it looks like ``6d:ca:6d:ca:6d:ca:6d:ca``). | ||||
|
||||
stsewd marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
.. note:: | ||||
|
||||
The private part of the SSH key is kept secret. | ||||
|
||||
GitHub | ||||
------ | ||||
|
||||
For GitHub, Read the Docs uses `deploy keys with read only access <https://developer.github.com/v3/guides/managing-deploy-keys/#deploy-keys>`__. | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I'd remove this since it does not add value for the user following this guide, IMO There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @stsewd ping There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this does add value, users can verify what we are telling them is true and find more information about the configuration by themselves. |
||||
GitHub doesn't allow you to reuse a deploy key across different repositories. | ||||
But you can use `machine users <https://developer.github.com/v3/guides/managing-deploy-keys/#machine-users>`__ | ||||
to give read access to several repositories using only one SSH key. | ||||
stsewd marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
- Remove the SSH deploy key that was added to the main repository on GitHub | ||||
stsewd marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
- Go to the project's settings on GitHub | ||||
stsewd marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
- Click on :guilabel:`Deploy Keys` | ||||
- Delete the key added by ``Read the Docs Commercial (readthedocs.com)`` | ||||
|
||||
- Create a GitHub user and give it read only permissions to all the necessary repositories. | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are two steps:
|
||||
You can do this by adding the account | ||||
as a `collaborator <https://help.github.com/en/github/setting-up-and-managing-your-github-user-account/inviting-collaborators-to-a-personal-repository>`__, | ||||
as an `outside collaborator <https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/adding-outside-collaborators-to-repositories-in-your-organization>`__, | ||||
or to a `team in an organization <https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/adding-organization-members-to-a-team>`__. | ||||
stsewd marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
- Attach the public SSH key from your project on Read the Docs to the GitHub user you just created | ||||
|
||||
- Go to the user's settings | ||||
- Click on :guilabel:`SSH and GPG keys` | ||||
- Click on :guilabel:`New SSH key` | ||||
- Put a descriptive title and paste the :ref:`public SSH key from your Read the Docs project <guides/private-submodules:Project's SSH key>` | ||||
- Click on :guilabel:`Add SSH key` | ||||
stsewd marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
Refer to the `GitHub documentation <https://developer.github.com/v3/guides/managing-deploy-keys/#machine-users>`__ for more information about machine users. | ||||
stsewd marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
GitLab | ||||
------ | ||||
|
||||
For GitLab, Read the Docs uses `deploy keys with read only access <https://docs.gitlab.com/ee/ssh/#deploy-keys>`__. | ||||
GitLab allows you to reuse a deploy key across different repositories. | ||||
Since Read the Docs already added the public SSH key on your main repository, | ||||
you only need to add it to each repository of your submodules. | ||||
stsewd marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
- Go to the project's settings on GitLab | ||||
stsewd marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
- Click on :guilabel:`Repository` | ||||
- Expand the ``Deploy Keys`` section | ||||
stsewd marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
- Put a descriptive title and paste the :ref:`public SSH key from your Read the Docs project <guides/private-submodules:Project's SSH key>` | ||||
stsewd marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
- Click on :guilabel:`Add key` | ||||
- Repeat the previous steps for each submodule. | ||||
|
||||
Bitbucket | ||||
--------- | ||||
stsewd marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
For Bitbucket, Read the Docs uses `access keys with read only access <https://confluence.atlassian.com/bitbucket/access-keys-294486051.html>`__. | ||||
Bitbucket allows you to reuse an access key across different repositories. | ||||
Since Read the Docs already set the public SSH key on your main repository, | ||||
you only need to add it to each repository of your submodules. | ||||
|
||||
- Go to the project's settings on Bitbucket | ||||
- Click on :guilabel:`Access keys` | ||||
- Click on :guilabel:`Add key` | ||||
- Put a descriptive label and paste the :ref:`public SSH key from your Read the Docs project <guides/private-submodules:Project's SSH key>` | ||||
- Click on :guilabel:`Add key` | ||||
- Repeat the previous steps for each submodule. | ||||
|
||||
Others | ||||
------ | ||||
|
||||
If you are not using any of the above providers. | ||||
Read the Docs will still generate a pair of SSH keys. | ||||
You'll need to add the :ref:`public SSH key from your Read the Docs project <guides/private-submodules:Project's SSH key>` | ||||
to the main repository and each of its submodules. | ||||
Refer to your provider's documentation for the steps. | ||||
stsewd marked this conversation as resolved.
Show resolved
Hide resolved
|
Uh oh!
There was an error while loading. Please reload this page.