https://github.com/cemoktra/cargolifter
doing the crate lifting for you
https://github.com/cemoktra/cargolifter
alternative-registries cargo registry rust
Last synced: about 1 month ago
JSON representation
doing the crate lifting for you
- Host: GitHub
- URL: https://github.com/cemoktra/cargolifter
- Owner: cemoktra
- Created: 2021-09-17T06:33:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-04T19:59:10.000Z (over 3 years ago)
- Last Synced: 2025-04-11T12:22:59.667Z (about 1 month ago)
- Topics: alternative-registries, cargo, registry, rust
- Language: Rust
- Homepage:
- Size: 293 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://github.com/cemoktra/cargolifter/actions)
[](https://crates.io/crates/cargolifter)# CargoLifter #
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:- Github
- Gitlab
- Gitea (e.g. codederg)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.
## Cargo Login ##
### Github ###
Use a combination of username and personal access token like this: `:`### Gitlab ###
Use your gitlab access token as cargo login token.## Configuration ##
Configuration is done via a JSON config file.### Service ###
```json
"web": {
"port": 8080
}
```### Storage ###
FileSystem storage configuration:
```json
"storage": {
"FileSystem": {
"path": ""
}
}
```S3 storage configuration (you may omit the `credentials` for S3 access as it will default to the environment variables):
```json
"storage": {
"S3": {
"bucket": "",
"credentials": {
"access_key": "",
"secret_key": "",
"secret_token": "",
}
}
}
```Files that are mirrored will automatically put in a subfolder called `mirror`.
### Backend ###
Github configuration:```json
"backend": {
"Github": {
"owner": "",
"repo": "",
"host": "",
"cargolifter_token": "",
"default_branch": ""
}
}
```Gitlab configuration:
```json
"backend": {
"Gitlab": {
"project_id": "",
"host": "",
"cargolifter_token": "",
"default_branch": ""
}
}
```The registry git repository must contain a prefilled `config.json` containing on both cases:
```json
{
"dl": "http://:/api/v1/crates",
"api": "http://:"
}
```### Example Config ###
```json
{
"backend": {
"Github": {
"owner": "cemoktra",
"repo": "my-private-crates",
}
},
"web": {
"port": 8080
},
"storage": {
"FileSystem": {
"path": "./test/storage"
}
}
}
```