To use this set of functionalities, one firstly has to authorize himselft to the GitHub API.
It can be done by creating https://github.com/settings/developers
(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:
myapp <- oauth_app("github", key = Client_ID, secret = Client_Secret),
github_token <- oauth2.0_token(oauth_endpoints("github"), myapp, scope = "public_repo").
The scope limits can be found here
https://developer.github.com/v3/oauth/#scopes.
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 (user.name parameter), user email (user.email
parameter) and user password (user.password parameter). Those parameters can be set globbaly
with aoptions("user.email", user.email), aoptions("user.name", user.name)
and aoptions("user.password", user.password).