When running usethis::use_github() with options(usethis.protocol = "ssh"), it invokes git2r and tries to push the commits to remote. However, git2r from CRAN (at least on macOS) doesn't support ssh protocol by default, see also https://github.com/ropensci/git2r/issues/415
It leads to silent failure as
r$> usethis::use_github()
โ Checking that current branch is 'master'
โ Check title and description
Name: foobar
Description: What the Package Does (One Line, Title Case)
Are title and description ok?
1: Yup
2: Nope
3: Absolutely not
Selection: 1
โ Creating GitHub repository
โ Setting remote 'origin' to '[email protected]:randy3k/foobar.git'
โ Adding GitHub links to DESCRIPTION
โ Pushing 'master' branch to GitHub and setting remote tracking branch
โ Failed to push and set tracking branch.
This often indicates a problem with git2r and the credentials.
Try this in the shell, to complete the set up:
`git push --set-upstream origin master`
โ Opening URL 'https://github.com/randy3k/foobar'
One solution that I see is to use https://github.com/r-lib/gert instead.
Believe me, replacing git2r with gert -- to get better control and visibility into credential management -- is our biggest and highest-priotiy meta-issue and WILL happen ๐
But I guess we don't have an issue for it, yet.
@randy3k BTW the usual thing to do here, in the meantime before we switch to Gert, is to install git2r as a source package (vs. binary). Either via install.packages() or devtools::install_github().
Most helpful comment
Believe me, replacing git2r with gert -- to get better control and visibility into credential management -- is our biggest and highest-priotiy meta-issue and WILL happen ๐
But I guess we don't have an issue for it, yet.