This function is a basic utility tool for getting a remote repository's cloning URL. This is especially helpful when creating an RStudio Project from a repository hosted on GitHub.

gh_get_clone_url(path, clone_type = "HTTPS")

Arguments

path

GitHub repo path of the form "username/repo". If not provided, will default to current repo.

clone_type

Method to clone remote repositories with. Default is "HTTPS". "SSH" and "GitHub CLI" are also supported. See https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories for more details.

Value

A cloning URL corresponding to the GitHub repo suppliied by the 'path' argument.

Examples

if (FALSE) { # Create a Private Repo gh_repos_create(path = "jdtrat/ghee_test", private = TRUE, description = "A test repository.") gh_get_clone_url("jdtrat/ghee_test") }