panamax-rs / panamax

Mirror rustup and crates.io repositories, for offline Rust and cargo usage.
Apache License 2.0
427 stars 45 forks source link

could not resolve host:panamax.internal #114

Open ugenehan opened 11 months ago

ugenehan commented 11 months ago

I didn't change base_url,after it reported errors like "could not resolve host:panamax.internal",I changed base_url,and rewrite config.json,but it does not resolved. https://github.com/panamax-rs/panamax/issues/84#issuecomment-1416569647

FibreFoX commented 10 months ago

Have you edited the /mirror/crates.io-index/config.json and /mirror/mirror.toml? I had the same problems, and did not use the "rewrite" command. After editing both files, it worked for me.

wcampbell0x2a commented 10 months ago

And importantly; the changes are committed if you edited the fle manually.

FibreFoX commented 10 months ago

@wcampbell0x2a what do you mean with "commited"? I just edited them in the mounted folder without restarting the container (using it via docker)

wcampbell0x2a commented 10 months ago

git committed. The config.json in crates-io-index must be committed.

FibreFoX commented 10 months ago

I did not have to commit anything, just editing was enough.

mkdir -p /mirror
docker run --rm -it -v "/mirror:/mirror" panamaxrs/panamax init /mirror
docker run --rm -it -v "/mirror:/mirror" panamaxrs/panamax sync /mirror
docker run --rm -it -d -v "/mirror:/mirror" -p 0.0.0.0:8080:8080 panamaxrs/panamax serve /mirror
# here I had the problems
# edited the mirror.toml first
vi /mirror/mirror.toml
# did not yet work
# edited the config.json second
vi /mirror/crates.io-index/config.json
# then it worked

Even tho /mirror/crates.io-index/ is a git repository, it does not have to be commited to take effect.

wcampbell0x2a commented 10 months ago

I did not have to commit anything, just editing was enough.

mkdir -p /mirror
docker run --rm -it -v "/mirror:/mirror" panamaxrs/panamax init /mirror
docker run --rm -it -v "/mirror:/mirror" panamaxrs/panamax sync /mirror
docker run --rm -it -d -v "/mirror:/mirror" -p 0.0.0.0:8080:8080 panamaxrs/panamax serve /mirror
# here I had the problems
# edited the mirror.toml first
vi /mirror/mirror.toml
# did not yet work
# edited the config.json second
vi /mirror/crates.io-index/config.json
# then it worked

Even tho /mirror/crates.io-index/ is a git repository, it does not have to be commited to take effect.

I see, with sparse-registry this must have changed.