-
Notifications
You must be signed in to change notification settings - Fork 286
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
use_pkgdown_github_pages() gives Error: Internal error: Unexpected GitHub remote configuration: 'theirs' #1588
Comments
Update: I tried branching and switching to my fork as the tracked remote, but I had the same result. |
Jenny may have a suggestion, but |
@malcolmbarrett , thanks for that info. I probably don't have sufficient access to make changes on GitHub to that repo. I suppose that the request here would be to make the error clearer, then. |
You won't be able to turn on GitHub Pages for a repo you don't have push access to. Using the GitHub remote setup vocabulary used in usethis and Happy Git, this requires the setup be recognized as "ours" or (in some cases, perhaps) "fork". https://happygitwithr.com/common-remote-setups.html @billdenney I see you say this:
but I am not sure exactly what you mean by "branching and switching to my fork" and whether that gets you into a clearly recognized and supported GitHub setup. This does feel like just a bad error message, i.e. we can't succeed here and we need to say that more clearly. |
@jennybc , Thanks! The explanation makes sense. Fair that I wasn't clear when I said "branching and switching to my fork". What I did was I created a new git branch and checked it out. Then I set my fork of the repo (where I do have push access) as the tracked branch. After that, I still got the same message. In reality, I'm not wanting to setup something on the GitHub side from that forked repo, so I think that still shouldn't work (or perhaps it should give an error unless there is a specific opt-in choice made). @jennybc , I think that your comment inspires a good error message: "use_pkgdown_github_pages() only works for repositories where you have push access". |
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.
usethis::use_pkgdown()
to add pkgdown to the package.pkgdown
which I did from source to version 2.0.2.usethis::use_pkgdown_github_pages()
, and it gave the error belowI then reran it after running
options(error=recover)
, and I looked at the value ofcfg
incheck_for_config()
, and it was as follows: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.The text was updated successfully, but these errors were encountered: