Get the remote url for remotes in a repo

remote_url(repo = ".", remote = NULL)



a path to a repository or a git_repository object. Default is '.'


Character vector with the remotes to get the url from. Default is the remotes of the repository.


Character vector with remote_url for each of the remote


if (FALSE) { ## Initialize a temporary repository path <- tempfile(pattern="git2r-") dir.create(path) repo <- init(path) ## Create a user and commit a file config(repo,"Alice","[email protected]") writeLines("Hello world!", file.path(path, "example.txt")) add(repo, "example.txt") commit(repo, "First commit message") ## Add a remote remote_add(repo, "playground", "") remotes(repo) remote_url(repo, "playground") ## Rename a remote remote_rename(repo, "playground", "foobar") remotes(repo) remote_url(repo, "foobar") ## Set remote url remote_set_url(repo, "foobar", "") remotes(repo) remote_url(repo, "foobar") ## Remove a remote remote_remove(repo, "foobar") remotes(repo) }