Chapter 25 Equivocal remote setups
Just like the previous section about the most common setups, we only consider a very constrained set of remotes:
- The remote is on GitHub, e.g. its URL looks something like
- The remote is named
The setups described here are characterized by incomplete information. This section exists mostly to explain feedback that the usethis package might give about a GitHub remote configuration. 2020-10 note: this currently refers to features in a development version of usethis. These features will appear in usethis v2.0.0.
To identify any of the remote setups described in section 24, we need information from GitHub:
- Whether you can push to a repo
- Whether a repo is a fork
- For a fork, what is its source repo
Sometimes some of this information is publicly available, but some of it never is, such as repo permissions. This means that programmatic access to this information, i.e. requests to the GitHub API, generally requires authorization by an authenticated GitHub user.
This means that client packages, like usethis, work best when you have configured a GitHub personal access token (PAT). See section 10.1 for more details on why and how to do that.
(If you’ve configured a PAT and are being told your GitHub config is problematic, consider these other explanations: Are you offline? Is GitHub down?)
25.1 Maybe “ours” or “theirs”
When we detect just one GitHub remote, but we can’t verify the info above, usethis describes the setup as “maybe_ours_or_theirs”.
25.2 Maybe fork
When we detect two GitHub remotes, but we can’t verify the info above, usethis describes the setup as “maybe_fork”.
25.3 How to fix
These setups aren’t necessarily broken, but usethis needs more information to operate.
To “fix” this, set up a GitHub personal access token. See section 10.1 for more details on why and how to do that.