{"id":22462480,"url":"https://github.com/commonjava/charon","last_synced_at":"2025-08-02T05:31:44.829Z","repository":{"id":40481785,"uuid":"397780726","full_name":"Commonjava/charon","owner":"Commonjava","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-01T01:33:59.000Z","size":1798,"stargazers_count":1,"open_issues_count":2,"forks_count":12,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-08-01T03:27:42.595Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Commonjava.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null}},"created_at":"2021-08-19T01:30:08.000Z","updated_at":"2025-07-16T07:17:05.000Z","dependencies_parsed_at":"2024-01-12T03:27:40.704Z","dependency_job_id":"142234e3-a7ed-448d-bf1d-21b5c2b2219c","html_url":"https://github.com/Commonjava/charon","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/Commonjava/charon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commonjava%2Fcharon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commonjava%2Fcharon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commonjava%2Fcharon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commonjava%2Fcharon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Commonjava","download_url":"https://codeload.github.com/Commonjava/charon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Commonjava%2Fcharon/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268339400,"owners_count":24234544,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-12-06T09:09:51.926Z","updated_at":"2025-08-02T05:31:44.474Z","avatar_url":"https://github.com/Commonjava.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# charon - Synchronize repositories to Ronda over AWS\n\nThis charon is a tool to synchronize several types of artifacts\nrepository data to RedHat Ronda service (maven.repository.redhat.com). These\nrepositories including types of maven, npm or some others like python in the\nfuture. And Ronda service will be hosted in AWS S3.\n\n## Prerequisites\n\n* python 3.9+\n* git\n\n### [Optional] Install AWS CLI tool\n\nSee [AWS CLi V2 installation](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html#cliv2-linux-install)\n\n### [Optional] rpm-sign or GnuPG CLI tool\n\nCan be configured to use rpm-sign or any command to generate .asc file.\n\n## Installation\n\n### From git\n\nClone this git repo and install charon using python installer:\n\n```bash\ngit clone https://github.com/Commonjava/charon.git\ncd charon\npip install --upgrade pip --user\npip install virtualenv --user\npython3 -m venv ./venv\nsource ./venv/bin/activate\npip install -r requirements-dev.txt\npython setup.py install \n```\n\n## Command guide\n\nThese commands will upload and distribute files in AWS via AWS CDK. Please\nfollow [boto3 access configuration](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html)\nto configure AWS access credentials.\n\n### Configurations\n\n* AWS configurations. The uploader uses aws boto3 to access AWS S3 bucket, and follows the AWS configurations statndards. You can use:\n  * AWS configurations files: $HOME/.aws/config and $HOME/.aws/credentials. (For format see [AWS config format](https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html))\n  * [System environment varaibles](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html)\n* Configurations for uploader. We use $HOME/.charon/charon.conf to hold these configurations. Currently, The uploader has two configurations:\n  * ignore_patterns. This is used to filter out some files that are not allowed to upload. It is a json array of regular expressions. (Example: [\"README.md\", \"example.txt\"]). This can also be retrieved from \"CHARON_IGNORE_PATTERNS\" system environment variable.\n  * bucket. This is used to specify which AWS S3 bucket to upload to with the tool. This config can also be retrieved from \"charon_bucket\" system environment variable.\n\n### charon-upload: upload a repo to S3\n\n```bash\nusage: charon upload $tarball --product/-p ${prod} --version/-v ${ver} [--root_path] [--ignore_patterns] [--debug] [--contain_signature] [--key]\n```\n\nThis command will upload the repo in tarball to S3.\nIt will auto-detect if the tarball is for maven or npm\n\n* For maven type, it will:\n\n  * Scan the tarball for all paths and collect them all.\n  * Check the existence in S3 for all those paths.\n  * Filter out the paths in tarball based on:\n    * filter_pattern in flags, or\n    * filter_pattern in config.json if no flag\n  * Generate/refresh all maven-metadata.xml for all GA combined\n    with both S3 and local filtered pom.xml\n  * Upload these artifacts to S3 with metadata of the product.\n  * If the artifacts already exists in S3, update the metadata\n    of the product by appending the new product.\n* NPM type (TBH): We need to know the exact tarball structure\n  of npm repo\n* For both types, after uploading the files, regenerate/refresh\n  the index files for these paths.\n\n### charon-delete: delete repo/paths from S3\n\n```bash\nusage: charon delete $tarball|$pathfile --product/-p ${prod}\n--version/-v ${ver} [--root_path] [--debug]\n```\n\nThis command will delete some paths from repo in S3.\n\n* Scan tarball or read pathfile for the paths to delete\n* Combine the product flag by --product and --version\n* Filter out the paths in tarball based on:\n  * filter_pattern in flags, or\n  * filter_pattern in config.json if no flag\n* If the artifacts have other products in the metadata,\n  remove the product of this tarball from the metadata\n  but not delete the artifacts themselves.\n* During or after the paths' deletion, regenerate the\n  metadata files and index files for both types.\n\n### charon-index: refresh the index.html for the specified path\n\n```bash\nusage: charon index $PATH [-t, --target] [-D, --debug] [-q, --quiet]\n```\n\nThis command will refresh the index.html for the specified path.\n\n* Note that if the path is a NPM metadata path which contains package.json, this refreshment will not work because this type of folder will display the package.json instead of the index.html in http request.\n\n### charon-cf-check: check the invalidation status of the specified invalidation id for AWS CloudFront\n\n```bash\nusage: charon cf check $invalidation_id [-t, --target] [-D, --debug] [-q, --quiet]\n```\n\n### charon-cf-invalidate: do invalidating on AWS CloudFront for the specified paths\n\n```bash\nusage: charon cf invalidate [-t, --target] [-p, --path] [-f, --path-file] [-D, --debug] [-q, --quiet]\n```\n\n### charon-checksum-validate: validate the checksum of files in specified path in a maven repository\n\n```bash\nusage: charon checksum validate $path [-t, --target] [-f, --report_file_path] [-i, --includes] [-r, --recursive] [-D, --debug] [-q, --quiet]\n```\n\nThis command will validate the checksum of the specified path for the maven repository. It will calculate the sha1 checksum of all artifact files in the specified path and compare with the companied .sha1 files of the artifacts, then record all mismatched artifacts in the report file. If some artifact files misses the companied .sha1 files, they will also be recorded.\n\n### charon-checksum-refresh: refresh the checksum files for the artifacts in the specified maven repository\n\n```bash\nusage: charon checksum refresh [-t, --target] [-p, --path] [-f, --path-file] [-D, --debug] [-q, --quiet]\n```\n\nThis command will refresh the checksum files for the specified artifact files in the maven repository. Sometimes the checksum files are not matched with the artifacts by some reason, so this command will do the refresh to make it match again. It will calculate the checksums of all artifact files in the specified path and compare with the companied checksum files of the artifacts, if the checksum are not matched, they will be refreshed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommonjava%2Fcharon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommonjava%2Fcharon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommonjava%2Fcharon/lists"}