Crates.io | cargolifter |
lib.rs | cargolifter |
version | 0.5.3 |
source | src |
created_at | 2021-09-28 18:09:21.916846 |
updated_at | 2021-12-04 19:39:15.019799 |
description | CargoLifter |
homepage | https://github.com/cemoktra/cargolifter |
repository | https://github.com/cemoktra/cargolifter |
max_upload_size | |
id | 457647 |
size | 54,787 |
This project offers an implementation of an alternate registry. Instead of having it's own auth mechanism it uses existing source control providers logins. Those are:
CargoLifter uses access tokens for interacting with the backend. So each action will be impersonated. This of course requires write access and this is the way to limit.
Use a combination of username and personal access token like this: <username>:<token>
Use your gitlab access token as cargo login token.
Configuration is done via a JSON config file.
"web": {
"port": 8080
}
FileSystem storage configuration:
"storage": {
"FileSystem": {
"path": "<path>"
}
}
S3 storage configuration (you may omit the credentials
for S3 access as it will default to the environment variables):
"storage": {
"S3": {
"bucket": "<bucket name>",
"credentials": {
"access_key": "<access key>",
"secret_key": "<secret key>",
"secret_token": "<optional secret token>",
}
}
}
Files that are mirrored will automatically put in a subfolder called mirror
.
Github configuration:
"backend": {
"Github": {
"owner": "<username>",
"repo": "<repository>",
"host": "<for future when hosting custom instance>",
"cargolifter_token": "<a token to use to merge pull requests>",
"default_branch": "<default to main>"
}
}
Gitlab configuration:
"backend": {
"Gitlab": {
"project_id": "<project id>",
"host": "<hosting custom instance>",
"cargolifter_token": "<a token to use to merge pull requests>",
"default_branch": "<default to main>"
}
}
The registry git repository must contain a prefilled config.json
containing on both cases:
{
"dl": "http://<hostname>:<port>/api/v1/crates",
"api": "http://<hostname>:<port>"
}
{
"backend": {
"Github": {
"owner": "cemoktra",
"repo": "my-private-crates",
}
},
"web": {
"port": 8080
},
"storage": {
"FileSystem": {
"path": "./test/storage"
}
}
}