Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.6.0 instead.
Reason given by maintainers: a malformed token env could print the token

cloudrepo-migrate (early access)

Moves a Nexus 2 server's repositories into CloudRepo and verifies every file.

  • Maven: every file of each hosted Maven repository, POMs and checksum files included.
  • npm: the latest dist-tag of each package in each hosted npm repository (older versions are counted in the report, not moved).
  • Skipped with a reason: proxy repositories (create a CloudRepo proxy instead), group repositories (create a CloudRepo group of the moved ones), virtual repositories, other formats, and files Nexus generates itself (.index, .meta, the root archetype-catalog.xml).

Every file is read back from CloudRepo after upload and its sha1 and sha256 compared with the source's bytes. A checksum file the source carries (X.sha1, X.sha256, X.sha512, X.md5) must name the digest of X. Any mismatch fails the run and names the file.

Install

pipx install cloudrepo-migrate

That installs it from pypi.org and puts cloudrepo-migrate on the PATH (pip install cloudrepo-migrate in a virtual environment works too).

It is one file, Python 3.8 or later, with no dependencies, so copying cloudrepo_migrate.py to a machine that can reach the Nexus server and running python3 cloudrepo_migrate.py --help works too.

Run

Create each target repository in CloudRepo first (same name as the Nexus repository, or map it with --repo SOURCE=TARGET) at https://admin.cloudrepo.io/repositories/create, and a repository token that can write them.

export NEXUS_USERNAME=deployer NEXUS_PASSWORD=...   # leave both unset for anonymous read
export CLOUDREPO_TOKEN=...
cloudrepo-migrate nexus2 --nexus-url https://nexus.example.com/nexus --org acme --dry-run
cloudrepo-migrate nexus2 --nexus-url https://nexus.example.com/nexus --org acme --report-json report.json
Flag Meaning
--nexus-url URL The Nexus 2 base URL, ending in /nexus on a default install.
--org ORG or --cloudrepo-url URL Your CloudRepo organization, or its full base URL (https).
--repo SOURCE[=TARGET] Move only these repositories (repeatable). Default: every hosted Maven and npm repository.
--dry-run List what would move. Uploads nothing. Checks the token and targets when CLOUDREPO_TOKEN is set.
--report-json PATH Also write the report as JSON.
--jobs N Parallel Maven uploads (default 4).
--work-dir DIR Where each file is spooled while it moves (default TMPDIR).
--nexus-ca-file PEM CA bundle for a Nexus with a private certificate.

With the environment set, nothing prompts. On a terminal with a credential missing it asks for it.

Resume: run the same command again. A file CloudRepo already holds with the same bytes is counted as already present and not uploaded again; a 409 on a release CloudRepo already holds counts as moved once its bytes match.

Exit codes: 0 everything moved and verified; 1 at least one file failed (every failure is listed with its path; re-run to resume); 2 a usage or preflight problem, such as a missing target repository or a refused token (nothing moved).

Credentials

  • Read only from the environment or a terminal prompt: never from the command line, never printed, never written to the report.
  • The Nexus login is sent only to --nexus-url, the CloudRepo token only to CloudRepo.
  • Redirects are never followed, and no URL is taken from a server's answer (a packument's dist.tarball contributes only its file name), so neither credential can be steered to another host.
  • CloudRepo must be https (plain http only to localhost). A plain-http Nexus gets a warning.

Metadata

Release files for cloudrepo-migrate 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cloudrepo-migrate 0.1.0
File Size Uploaded Provenance
cloudrepo_migrate-0.1.0.tar.gz 13.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cloudrepo-migrate 0.1.0
File Interpreter ABI Platform
cloudrepo_migrate-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.5 kB

Release files / cloudrepo_migrate-0.1.0.tar.gz

Download URL cloudrepo_migrate-0.1.0.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4f68942fa1f247e9a1bbbb36f23b719ee2e570b4d122cc23e525bd6fe0bb59d6
BLAKE2b-256 checksum
How to use checksums
e716a9cf9ea5e01527dfdea6e0be2ea795d939bdf33026c0a964d9caf134a2d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / cloudrepo_migrate-0.1.0-py3-none-any.whl

Download URL cloudrepo_migrate-0.1.0-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1bf7a4543cd50fb82bb4222a8dbd59c21a0ecbbfa3efc87242355a11f030d9b
BLAKE2b-256 checksum
How to use checksums
bb35e45c06f9e86527585e25a25bcc841ba4af572cbfa4d00b1ab684104e85f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.3

Security for cloudrepo-migrate 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page