@@ -91,9 +91,12 @@ create_project <- function(path,
9191# ' required in order for `create_from_github()` to do ["fork and
9292# ' clone"](https://help.github.com/articles/fork-a-repo/). It is also required
9393# ' by [use_github()], which connects existing local projects to GitHub.
94+ # ' [use_github()] has more detailed advice on working with the `protocol` and
95+ # ' `credentials` arguments.
9496# '
95- # ' @seealso [use_course()] for one-time download of all files in a Git repo,
96- # ' without any local or remote Git operations.
97+ # ' @seealso [use_github()] for GitHub setup advice. [use_course()] for one-time
98+ # ' download of all files in a Git repo, without any local or remote Git
99+ # ' operations.
97100# '
98101# ' @inheritParams create_package
99102# ' @param repo_spec GitHub repo specification in this form: `owner/repo`.
@@ -115,6 +118,17 @@ create_project <- function(path,
115118# ' @examples
116119# ' \dontrun{
117120# ' create_from_github("r-lib/usethis")
121+ # '
122+ # ' create_from_github("r-lib/usethis", protocol = "https")
123+ # '
124+ # ' ## various ways code can look when specifying ssh credential explicitly
125+ # ' create_from_github("r-lib/usethis", credentials = git2r::cred_ssh_key())
126+ # '
127+ # ' cred <- git2r::cred_ssh_key(
128+ # ' publickey = "path/to/id_rsa.pub",
129+ # ' privatekey = "path/to/id_rsa"
130+ # ' )
131+ # ' create_from_github("cran/TailRank", credentials = cred)
118132# ' }
119133create_from_github <- function (repo_spec ,
120134 destdir = NULL ,
0 commit comments