Skip to content

Instantly share code, notes, and snippets.

@mashintsev
Created February 20, 2025 11:30
Show Gist options
  • Select an option

  • Save mashintsev/3e6ab7840d6233ab7932565d056b8158 to your computer and use it in GitHub Desktop.

Select an option

Save mashintsev/3e6ab7840d6233ab7932565d056b8158 to your computer and use it in GitHub Desktop.
Nexus proxy repository for Cargo/Rust
# Create Nexus Proxy Reposity with Remote Storage = https://index.crates.io
# .cargo/config.toml should be placed accoding docs https://doc.rust-lang.org/cargo/reference/config.html
[registries.nexus]
index = "sparse+https://nexus.app/repository/cargo/"
[registry]
default = "nexus"
[source.crates-io]
replace-with = "nexus"
[source.nexus]
registry = "sparse+https://nexus.app/repository/cargo/"
@weltonrodrigo
Copy link

thanks!

@skyao
Copy link

skyao commented Apr 10, 2025

Thank you for help!!

It works! This is the only right answer that I found in google to setup a cargo proxy repository in nexus.

And it seems that it only works for "https://index.crates.io", but not for other cargo proxy. Is this true?

I tried to replace "https://index.crates.io" with "https://mirrors.ustc.edu.cn/crates.io-index/", and cargo build will failed to download:

warning: spurious network error (2 tries remaining): failed to get successful HTTP response from `http://192.168.0.246:8081/repository/cargo-proxy-ustc/crates/async-recursion/1.1.1/download` (192.168.0.246), got 500
body:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment