Skip to content

use_pkgdown_github_pages() gives Error: Internal error: Unexpected GitHub remote configuration: 'theirs' #1588

@billdenney

Description

@billdenney

When trying to do usethis::use_pkgdown_github_pages(), as suggested at https://pkgdown.r-lib.org/articles/pkgdown.html, I got an error noted below. I don't know of a good way to make a reprex for this, so I will try to give all the information that I can to indicate what I've done with the hopes that it is close to a reprex.

My goal is to add a pkgdown site to the nlmixr2 package. The steps I took were:

I'm running R 4.1.2 on Windows 10. I already had the nlmixr2 library cloned to my local hard drive and I have a branch for the origin and my fork.

  1. Load R
  2. Run usethis::use_pkgdown() to add pkgdown to the package.
    1. It asked me to install pkgdown which I did from source to version 2.0.2.
  3. Run usethis::use_pkgdown_github_pages(), and it gave the error below
> usethis::use_pkgdown_github_pages()
Error: Internal error: Unexpected GitHub remote configuration: 'theirs'
> traceback()
5: stop(cnd)
4: ui_stop("\n    Internal error: Unexpected GitHub remote configuration: {ui_value(cfg$type)}")
3: check_for_config(cfg)
2: target_repo(github_get = TRUE)
1: usethis::use_pkgdown_github_pages()

I then reran it after running options(error=recover), and I looked at the value of cfg in check_for_config(), and it was as follows:

Browse[2]> print(cfg)
Type = 'theirs'
Host = 'https://github.com'
Config supports a pull request = FALSE
origin = 'nlmixr2/nlmixr2' (can not push)
upstream = <not configured>
Desc = The only configured GitHub remote is 'origin', which
you cannot push to.
If your goal is to make a pull request, you must fork-and-clone.
`usethis::create_from_github()` can do this.

Read more about the GitHub remote configurations that usethis supports at:
'https://happygitwithr.com/common-remote-setups.html'

My guess about the issue is that I don't think that I can write directly to the origin/main branch, and I've not yet switched to my fork where I can write.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions