Closed jesse-ross closed 2 years ago
This was pretty quick
usethis::git_default_branch_rename()
✓ Setting active project to '/Users/jread/Documents/R/meddle'
Error: Pull request functions can't work with GitHub remote configuration: 'maybe_fork'
The most likely problem is that we aren't discovering your GitHub personal access token
Call `gh_token_help()` for help
* Host = 'https://github.com'
* origin = 'jread-usgs/meddle' = fork of 'USGS-R/meddle'
* upstream = 'USGS-R/meddle'
* Both 'origin' and 'upstream' appear to be GitHub repos. However, we can't confirm their relationship to each other (e.g., fork and fork parent) or your permissions (e.g. push access).
We may be offline or you may need to configure a GitHub personal access
token. `gh_token_help()` can help with that.
Read more about what this GitHub remote configurations means at:
'https://happygitwithr.com/common-remote-setups.html'
then
usethis::gh_token_help()
• GitHub host: 'https://github.com'
• Personal access token for 'https://github.com': <unset>
• To create a personal access token, call `create_github_token()`
• To store a token for current and future use, call `gitcreds::gitcreds_set()`
ℹ Read more in the 'Managing Git(Hub) Credentials' article:
https://usethis.r-lib.org/articles/articles/git-credentials.html
usethis::create_github_token()
• Call `gitcreds::gitcreds_set()` to register this token in the local Git credential store
It is also a great idea to store this token in any password-management software that you use
✓ Opening URL 'https://github.com/settings/tokens/new?scopes=repo,user,gist,workflow&description=DESCRIBE THE TOKEN\'S USE CASE'
and followed Jesse's gitcreds::gitcreds_set()
instructions after the online token prompt. I used a 30 day expiring token
🎉
The
master
branch of this repository will soon be renamed frommaster
tomain
, as part of a coordinated change across the USGS-R organization. This is part of a broader effort across the git community to use more inclusive language. For instance, git, GitHub, and GitLab have all changed or are in the process of changing their default branch name.We anticipate this will happen early in the week of December 13, 2021. The purpose of this issue is to give notification of the change and provide information on how to make it go smoothly.
If you wish to make the change yourself, it can either be done manually or through some convenience functions in the
usethis
package.Using usethis
Note:
usethis
must be version 2.1.2 or higherusethis::git_default_branch_rename()
The screen shot below shows the output of this command in addition to a few other commands. For more details see here.
Note that if you have not yet set up git credentials for HTTPS, you can do so by creating a GitHub PAT and using
gitcreds::gitcreds_set()
to register it with git.Manual Method
master
tomain
.usethis::git_default_branch_rediscover
(see above) or else run the following: