archivist-github-integration {archivist.github}R Documentation

Archivist Integration With GitHub


Set of functions to integrate archivist-package with GitHub API

To start working with archivist.github one should run authoriseGitHub to create an OAuth token which is required by every function in this package.

It is possible to create new GitHub repository with an empty archivist-like Repository with createGitHubRepo function.

archive stores artifacts in the Local Repository and automatically pushes archived artifacts to the GitHub Repository with which the Local Repository is synchronized.

cloneGitHubRepo clones GitHub Repository into the local directory.

deleteGitHubRepo can delete whole GitHub-Repository or only archivist-like Repository stored on a GitHub-Repository.

pushGitHubRepo and pullGitHubRepo synchronize Local and GitHub (remote) Repository.


To use this set of functionalities, one firstly has to authorize himselft to the GitHub API. It can be done by creating (register new application). If you do not know what should be included as callback url, you may use http://localhost:1410 for testing purposes. When application is created, one will have to copy its Client ID and Client Secret and authorize his github user with this application by running those commands:

The scope limits can be found here Basically, this is how you grant an access to your application and give permissions. With such a token one is authorized and can work with GitHub API and archivist functions devoted to GitHub integration.

To perform GitHub integration operations such as push, pull, commit, add etc. a user has to pass his GitHub user name ( parameter), user email ( parameter) and user password (user.password parameter). Those parameters can be set globbaly with aoptions("",, aoptions("", and aoptions("user.password", user.password).


Note that global configuration of the git config is used for initial commit. One can later specify local configuration for the repository with config, e.g config(repoName, = "Alice", = "").

Bug reports and feature requests can be sent to


Marcin Kosinski,


More about archivist.github can be found on and about archivist in posts' history on

See Also

Other archivist: addHooksToPrintGitHub


## Not run: 
authoriseGitHub(ClientID, ClientSecret) -> github_token
# authoriseGitHub also does: aoptions("github_token", github_token)
aoptions("password", user.password)

## here github_token is used
createGitHubRepo("Museum-Extras", response = TRUE)
createGitHubRepo("Gallery", readme = NULL)
repoDescription = "My models and stuff")

## End(Not run)

[Package archivist.github version 0.2.6 Index]