Skip to content

Commit 51a023a

Browse files
Park resolutions to common build problems in FAQ (#9472)
* Proposal to put resolutions to common build problems somewhere. Could be in the already-overloaded FAQ? * Add paragraph-level headlines, tweak the language to be less finger-pointing add user * Consolidate with the final resolution found to "Repository not found." error * Apply suggestions from @agjohnson code review Co-authored-by: Anthony <[email protected]> * Create new section Build Troubleshooting, expand explanation about adding deploy keys Co-authored-by: Anthony <[email protected]>
1 parent f4ead6b commit 51a023a

File tree

2 files changed

+83
-0
lines changed

2 files changed

+83
-0
lines changed

docs/user/build-troubleshooting.rst

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
Build troubleshooting
2+
=====================
3+
4+
This section is very specific and may change over time.
5+
Please help us keep it updated and contribute your own build errors and resolutions.
6+
7+
8+
Git errors
9+
----------
10+
11+
In the examples below, we use ``github.com``, however error messages are similar for GitLab, Bitbucket etc.
12+
13+
14+
terminal prompts disabled
15+
~~~~~~~~~~~~~~~~~~~~~~~~~
16+
17+
.. code-block:: text
18+
19+
fatal: could not read Username for 'https://github.com': terminal prompts disabled
20+
21+
**Resolution:** This error can be quite misleading. It usually occurs when a repository could not be found because of a typo in the reposistory name or because the repository has been deleted. Verify your repository URL in :guilabel:`Admin > Advanced Settings`.
22+
23+
This error also occurs if you have changed a ``public`` repository to ``private`` and you are using ``https://`` in your git repository URL.
24+
25+
.. note::
26+
27+
To use private repositories, you need a plan on `Read the Docs for Business <https://readthedocs.com>`__.
28+
29+
30+
error: pathspec
31+
~~~~~~~~~~~~~~~
32+
33+
.. code-block:: text
34+
35+
error: pathspec 'main' did not match any file(s) known to git
36+
37+
**Resolution:** A specified branch does not exist in the git repository.
38+
This might be because the git repository was recently created (and has no commits nor branches) or because the default branch has changed name. If for instance, the default branch on GitHub changed from ``master`` to ``main``, you need to visit :guilabel:`Admin > Advanced Settings` to change the name of the default branch that Read the Docs expects to find when cloning the repository.
39+
40+
41+
Permission denied (publickey)
42+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
43+
44+
.. code-block:: text
45+
46+
[email protected]: Permission denied (publickey).
47+
48+
fatal: Could not read from remote repository.
49+
50+
**Resolution:** The git repository URL points to a repository, user account or organization that Read the Docs does not have credentials for. Verify that the public SSH key from your Read the Docs project is installed as a *deploy key* on your VCS (GitHub/GitLab/Bitbucket etc):
51+
52+
.. This should be included as a snippet since it's used 2 times already
53+
54+
1. Navigate to :guilabel:`Admin > SSH Keys`
55+
2. Copy the contents of the public key.
56+
3. Ensure that the key exists as a deploy key at your VCS provider. Here are direct links to access settings for verifying and changing deploy keys - customize the URLs for your VCS host and repository details:
57+
58+
- ``https://github.com/<username>/<repo>/settings/keys``
59+
- ``https://gitlab.com/<username>/<repo>/-/settings/repository``
60+
- ``https://bitbucket.org/<username>/<repo>/admin/access-keys/``
61+
62+
63+
64+
ERROR: Repository not found.
65+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66+
67+
.. code-block:: text
68+
69+
ERROR: Repository not found.
70+
fatal: Could not read from remote repository.
71+
72+
**Resolution:** This error usually occurs on private git repositories that no longer have the public SSH key from their Read the Docs project installed as a *deploy key*.
73+
74+
1. Navigate to :guilabel:`Admin > SSH Keys`
75+
2. Copy the contents of the public key.
76+
3. Ensure that the key exists as a deploy key at your VCS provider. Here are direct links to access settings for verifying and changing deploy keys - customize the URLs for your VCS host and repository details:
77+
78+
- ``https://github.com/<username>/<repo>/settings/keys``
79+
- ``https://gitlab.com/<username>/<repo>/-/settings/repository``
80+
- ``https://bitbucket.org/<username>/<repo>/admin/access-keys/``
81+
82+
This error is rare for public repositories. If your repository is public and you see this error, it may be because you have specified a wrong domain or forgotten a component in the path.

docs/user/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ and some of the core features of Read the Docs.
121121

122122
/builds
123123
/build-customization
124+
/build-troubleshooting
124125
/environment-variables
125126
/badges
126127

0 commit comments

Comments
 (0)