Manolo
June 13, 2023, 9:22pm
1
I ma developin a package and I not the following error using the function usethis::use_pkgdown_github_pages()
usethis::use_pkgdown_github_pages()
Error in stop_bad_github_remote_config()
:
! Unsupported GitHub remote configuration: 'no_github'
• Host = NA
• origin =
• upstream =
• Neither 'origin' nor 'upstream' is a GitHub repo.
Read more about the GitHub remote configurations that usethis supports at:
'Chapter 25 Common remote setups | Happy Git and GitHub for the useR '
Run rlang::last_trace()
to see where the error occurred.
Gabor
June 14, 2023, 6:35am
2
Yes, as the error says, usethis::use_pkgdown_github_pages()
requires that the package is on GitHub, i.e. git remote -v
should show something like:
❯ git remote -v
origin https://github.com/<user>/<repo> (fetch)
origin https://github.com/<user>/<repo> (push)
Manolo
June 14, 2023, 12:27pm
3
Thank you Gabor.
How can I get the right setting or connect my package to my existing github repository.
I have another package that works fine and this is what I get when I do:
git remote -v
origin git@github.com :ManuelSpinola/crgrids.git (fetch)
origin git@github.com :ManuelSpinola/crgrids.git (push)
Gabor
June 14, 2023, 12:42pm
4
Use git remote add origin <URL>
.
usethis is best with https://
URLs, and not great with the ssh
URLs you have. See here: About remote repositories - GitHub Docs and here: Managing Git(Hub) Credentials • usethis
Manolo
June 14, 2023, 12:49pm
5
I did that
git remote -v
origin GitHub - ManuelSpinola/crbiodiversity (fetch)
origin GitHub - ManuelSpinola/crbiodiversity (push)
upstream GitHub - ManuelSpinola/crbiodiversity (fetch)
upstream GitHub - ManuelSpinola/crbiodiversity (push)
but I still got the same error message:
use_pkgdown_github_pages()
Setting active project to '/Users/manuelspinola/Documents/R/R_packages/crbiodiversity'
Error in stop_bad_github_remote_config()
:
! Unsupported GitHub remote configuration: 'no_github'
• Host = NA
• origin =
• upstream =
• Neither 'origin' nor 'upstream' is a GitHub repo.
Read more about the GitHub remote configurations that usethis supports at:
'Chapter 25 Common remote setups | Happy Git and GitHub for the useR '
Run rlang::last_trace()
to see where the error occurred.
Gabor
June 14, 2023, 1:01pm
6
What's the output of
gert::git_remote_list()
right after the usethis failure? If that does look right, then I would open an issue in the usethis repository.
Manolo
June 14, 2023, 1:24pm
7
gert::git_remote_list()
# A tibble: 0 × 2
# ℹ 2 variables: name <chr>, url <chr>
I need to add that my package debvelopment crash when I used deploy_to_branch()
Deleted most of the files in my package project folder, and I rebuild the package again, may be in that process something was missing.
Gabor
June 14, 2023, 1:42pm
8
That means that git remote
is not set up correctly. You have to call git remote add origin ...
(again).
Manolo
June 14, 2023, 2:04pm
9
It says: "remote origin already exists."
Manolo
June 14, 2023, 2:05pm
10
git remote add origin GitHub - ManuelSpinola/crbiodiversity
error: remote origin already exists.
Manolo
June 14, 2023, 2:15pm
11
I also have gh-pages in my repository.
Gabor
June 14, 2023, 2:16pm
12
Are you sure that you are running git and R in the same working directory? Run
getwd()
in R and
pwd
in the shell to make sure.
Manolo
June 14, 2023, 2:25pm
13
getwd()
[1] "/Users/manuelspinola/Documents/R/R_packages/crbiodiversity"
pwd
/Users/manuelspinola/Library/Mobile Documents/com~apple~CloudDocs/.Trash/crbiodiversity 14.28.14
Manolo
June 14, 2023, 2:31pm
14
Something is wrong in my terminal.
Manolo
June 14, 2023, 2:37pm
15
1 Like
system
Closed
July 28, 2023, 9:22pm
16
This topic was automatically closed after 45 days. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.