gh_get_clone_url: Get Clone URL for a Repository

Description Usage Arguments Value Examples

View source: R/misc.R

Description

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.

Usage

1
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

1
2
3
4
5
6
7
8
9
## Not run: 

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

gh_get_clone_url("jdtrat/ghee_test")


## End(Not run)

jdtrat/simplegit documentation built on Aug. 13, 2021, 8:38 p.m.