CRAN Package Registry
Prerequisites
- Obtain a GitFlic transport token:
 Transport Token Guide
- Replace {gitflic domain}with:
- SaaS version: registry.gitflic.ru
- Self-hosted: localhost:8080(port may vary)
CRAN packages support two file types:
- Source packages (.tar.gz)
- Binary packages (.tgz or .zip)  
Publishing Packages
Source Packages
Project-level publication:
curl --upload-file {path/to/package}/{filename}.tar.gz \
https://{username}:{transport_token}@{gitflic domain}/project/{ownerAlias}/{projectAlias}/package/-/cran/src/{filename}.tar.gz
Company-level publication:
curl --upload-file {path/to/package}/{filename}.tar.gz \
https://{username}:{transport_token}@{gitflic domain}/company/{companyAlias}/package/-/cran/src/{filename}.tar.gz
Binary Packages
Project-level publication:
curl --upload-file {path/to/package}/{filename}.{ext} \
"https://{username}:{transport_token}@{gitflic domain}/project/{ownerAlias}/{projectAlias}/package/-/cran/bin/{filename}.{ext}?platform={platform}&rversion={languageVersion}"
Company-level publication:
curl --upload-file {path/to/package}/{filename}.{ext} \
"https://{username}:{transport_token}@{gitflic domain}/company/{companyAlias}/package/-/cran/bin/{filename}.{ext}?platform={platform}&rversion={languageVersion}"
Note:
- Enclose URLs in quotes ("") on some operating systems
-platformaccepts:macosx,windows(Linux packages not supported)
| Parameter | Description | 
|---|---|
| ownerAlias | Project owner nickname | 
| projectAlias | Project nickname | 
| companyAlias | Company nickname | 
| transport_token | User transport token | 
| platform | Target OS ( macosx/windows) | 
| languageVersion | R language version | 
Successful upload returns: Success  
Installing Packages
Environment Setup
macOS/Windows
Install R from official site
Linux:
Ubuntu/Debian:
sudo apt update && sudo apt install r-base
sudo -i R
Red Hat/Fedora:
sudo dnf install epel-release && sudo dnf install R
sudo -i R
Full Package Installation
Project-level:
install.packages('{packageName}', 
  repos='https://{username}:{transport_token}@{gitflic domain}/project/{ownerAlias}/{projectAlias}/package/-/cran')
Company-level:
install.packages('{packageName}', 
  repos='https://{username}:{transport_token}@{gitflic domain}/company/{companyAlias}/package/-/cran')
Instance-level:
install.packages('{packageName}', 
  repos='https://{username}:{transport_token}@{gitflic domain}/registry/package/-/cran')
Single File Installation
Source files:
install.packages('https://{username}:{transport_token}@{gitflic domain}/.../src/contrib/{filename}', 
  repo=NULL, type="source")
Binary files:
install.packages('https://{username}:{transport_token}@{gitflic domain}/.../bin/{platform}/{architecture}/contrib/{rversion}/{filename}', 
  repo=NULL, type="source")
| Parameter | Description | 
|---|---|
| architecture | Platform architecture | 
| rversion | R language version | 
Automatic translation!
This page has been automatically translated. The text may contain inaccuracies.