cloneGitHubRepo {archivist.github}R Documentation

Clone Github Repository

Description

cloneGitHubRepo is a wrapper around git clone and clones GitHub Repository into the repoDir directory.

Usage

cloneGitHubRepo(repoURL, repoDir = NULL, default = FALSE, ...)

Arguments

repoURL

The remote repository to clone.

repoDir

Local directory to clone to. If NULL, by default, creates a local directory, which corresponds to the name after last / in repoURL.

default

Sets cloned Repository as default Local and GitHub Repository. If default = TRUE then repoDir (last piece of repoURL) is set as default Local Repository and for GitHub repository also the user from repoURL is set as default GitHub user).

...

Further parameters passed to clone.

Details

To learn more about Archivist Integration With GitHub visit agithub.

Note

Bug reports and feature requests can be sent to https://github.com/MarcinKosinski/archivist.github/issues

Author(s)

Marcin Kosinski, m.p.kosinski@gmail.com

References

More about archivist.github can be found on marcinkosinski.github.io/archivist.github/ and about archivist in posts' history on https://pbiecek.github.io/archivist/articles/posts.html

See Also

Other archivist.github: archive, archivist.github-package, authoriseGitHub, createGitHubRepo, deleteGitHubRepo, pushGitHubRepo

Examples

## Not run: 

cloneGitHubRepo("https://github.com/MarcinKosinski/Museum")
cloneGitHubRepo("https://github.com/MarcinKosinski/Museum-Extra")


# empty Github Repository creation
authoriseGitHub(ClientID, ClientSecret) -> github_token
# authoriseGitHub also does: aoptions("github_token", github_token)
aoptions("user", user.name)
aoptions("password", user.password)

createEmptyGithubRepo("archive-test4")
setRemotebRepo(aoptions("name"), "archive-test4")
## artifact's archiving
example <- 1:100

# archiving
archive(example) -> md5hash_path

## proof that artifact is really archived
showRemoteRepo() # uses options from setGithubRepo
# let's remove przyklad
rm(example)
# and load it back from md5hash_path
aread(md5hash_path)


# clone example
unlink("archive-test", recursive = TRUE)
cloneGitHubRepo('https://github.com/MarcinKosinski/archive-test')
setRemoteRepo(aoptions("name"), "archive-test")
# equivalent is cloneGitHubRepo('https://github.com/MarcinKosinski/archive-test', default = TRUE)
# check if default is set with
# aoptions('repoDir'); aoptions('repo'); aoptions('user')
data(iris)
archive(iris)
showRemoteRepo()



## End(Not run)

[Package archivist.github version 0.2.6 Index]