{"id":20384937,"url":"https://github.com/d-e-s-o/cargo-http-registry","last_synced_at":"2025-04-09T15:08:38.767Z","repository":{"id":43455666,"uuid":"313498492","full_name":"d-e-s-o/cargo-http-registry","owner":"d-e-s-o","description":"A cargo registry allowing for quick publishing of crates when using crates.io is just not desired.","archived":false,"fork":false,"pushed_at":"2025-02-27T14:25:00.000Z","size":244,"stargazers_count":19,"open_issues_count":2,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-09T15:08:31.332Z","etag":null,"topics":["cargo","crates-io","registry","registry-server","rust","rust-lang"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/d-e-s-o.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-17T03:39:08.000Z","updated_at":"2025-02-27T14:25:04.000Z","dependencies_parsed_at":"2024-02-20T01:30:40.668Z","dependency_job_id":"4e07c7fe-f472-434c-a2fc-4c15c291b3b8","html_url":"https://github.com/d-e-s-o/cargo-http-registry","commit_stats":{"total_commits":146,"total_committers":7,"mean_commits":"20.857142857142858","dds":0.4452054794520548,"last_synced_commit":"2edffd86b7726ce1392b3c500fd68ff877361e2c"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-e-s-o%2Fcargo-http-registry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-e-s-o%2Fcargo-http-registry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-e-s-o%2Fcargo-http-registry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-e-s-o%2Fcargo-http-registry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d-e-s-o","download_url":"https://codeload.github.com/d-e-s-o/cargo-http-registry/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248055282,"owners_count":21040157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cargo","crates-io","registry","registry-server","rust","rust-lang"],"created_at":"2024-11-15T02:30:42.403Z","updated_at":"2025-04-09T15:08:38.745Z","avatar_url":"https://github.com/d-e-s-o.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![pipeline](https://github.com/d-e-s-o/cargo-http-registry/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/d-e-s-o/cargo-http-registry/actions/workflows/test.yml)\n[![crates.io](https://img.shields.io/crates/v/cargo-http-registry.svg)](https://crates.io/crates/cargo-http-registry)\n[![rustc](https://img.shields.io/badge/rustc-1.64+-blue.svg)](https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html)\n\ncargo-http-registry\n===================\n\n- [Changelog](CHANGELOG.md)\n\n`cargo-http-registry` is a cargo registry allowing for quick publishing\nof crates when using `crates.io` is just not desired.\n\nThe application can be used to host a local registry to which crates can\nbe published. Publishing of crates happens over a regular HTTP based API\nand can be interfaced with through regular `cargo publish` command.\nCrates are stored on the file system and no registry is necessary for\naccessing them.\n\nUsage\n-----\n\nTo set up a local registry just run `cargo-http-registry` and provide\na path to the registry's root directory:\n```sh\n$ cargo-http-registry /tmp/my-registry\n```\n\nThe directory will be created if it does not exist and is populated as\nneeded.\n\nBy default, the registry will listen only locally on `127.0.0.1`, but\ncommand line options allow for overwriting this setting.\n\nTo make `cargo` aware of this registry, it needs to be made known in a\n[`cargo` configuration file][cargo-config]. The registry can be accessed\nvia the local file system (by specifying the path to it) or over HTTP.\nThe HTTP address and port can be found in the registry's `config.json`\n(e.g., `/tmp/my-registry/config.json` in the example; refer to the `api`\nkey contents).\nThen open your `~/.cargo/config.toml` (or a per-project configuration) and\nadd the following lines:\n```toml\n[registries]\nmy-registry = { index = \"http://127.0.0.1:35503/git\" }\n# Alternatively, access it via path:\nmy-registry = { index = \"file:///tmp/my-registry\" }\n```\n\nAlso note that for HTTP access, you will need to enable the\n[`net.git-fetch-with-cli` setting][cargo-net-git-cli]. That can be\naccomplished via `config.toml` as well, for example by adding:\n```toml\n[net]\ngit-fetch-with-cli = true\n```\n\nWith that, you can now publish your crates to the registry and pull them\nfrom it.\n```sh\n$ cargo publish --registry my-registry\n    Updating `/tmp/my-registry` index\n   Packaging my-lib v0.1.0\n   Verifying my-lib v0.1.0\n   Compiling my-lib v0.1.0\n    Finished dev [unoptimized + debuginfo] target(s) in 0.09s\n   Uploading my-lib v0.1.0\n```\n\nThe created registry does not require any token checks. As such, if\nbeing asked to `cargo login` to the registry, any string may be used.\n\nYou can also adjust the crate to only allow publishing to a certain\nregistry, which will prevent accidental pushes to `crates.io`:\n```diff\n--- Cargo.toml\n+++ Cargo.toml\n@@ -1,9 +1,10 @@\n [package]\n name = \"my-lib\"\n version = \"0.1.0\"\n authors = [\"Daniel Mueller \u003cdeso@posteo.net\u003e\"]\n edition = \"2018\"\n+publish = [\"my-registry\"]\n\n # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html\n\n [dependencies]\n```\n\nTo consume the published crate from the local registry, simply set the\n`registry` key for the dependency:\n```diff\n--- Cargo.toml\n+++ Cargo.toml\n@@ -8,3 +8,4 @@ edition = \"2018\"\n\n [dependencies.my-lib]\n version = \"0.1\"\n+registry = \"my-registry\"\n```\n\nNote that `cargo-http-registry` is not meant to be a `cargo` subcommand\nand cannot be used as such.\n\nNote furthermore that the registry is meant to be used in a trusted\nsetting, such as on a single computer or local home network. The reason\nbeing that, by design, it does not have any authentication scheme\npresent and no attempts of hardening the code have been undertaken.\n\n[cargo-config]: https://doc.rust-lang.org/cargo/reference/config.html\n[cargo-net-git-cli]: https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli\n[docs-rs]: https://docs.rs/crate/cargo-http-registry\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-e-s-o%2Fcargo-http-registry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd-e-s-o%2Fcargo-http-registry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-e-s-o%2Fcargo-http-registry/lists"}