{"id":34521866,"url":"https://github.com/secondlife/with-cloudsmith","last_synced_at":"2026-05-26T18:31:58.224Z","repository":{"id":242011856,"uuid":"807951951","full_name":"secondlife/with-cloudsmith","owner":"secondlife","description":"Inject Cloudsmith registry config then clean it up","archived":false,"fork":false,"pushed_at":"2025-04-29T15:22:52.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-29T16:31:45.729Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/secondlife.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":"2024-05-30T05:12:31.000Z","updated_at":"2025-04-29T15:22:54.000Z","dependencies_parsed_at":"2024-05-31T06:24:00.122Z","dependency_job_id":"ca0b312a-5c9e-401a-925e-09c7cf327851","html_url":"https://github.com/secondlife/with-cloudsmith","commit_stats":null,"previous_names":["secondlife/with-cloudsmith"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/secondlife/with-cloudsmith","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secondlife%2Fwith-cloudsmith","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secondlife%2Fwith-cloudsmith/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secondlife%2Fwith-cloudsmith/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secondlife%2Fwith-cloudsmith/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/secondlife","download_url":"https://codeload.github.com/secondlife/with-cloudsmith/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secondlife%2Fwith-cloudsmith/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33534562,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"ssl_error","status_checked_at":"2026-05-26T15:22:15.568Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2025-12-24T04:59:04.346Z","updated_at":"2026-05-26T18:31:58.210Z","avatar_url":"https://github.com/secondlife.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# with-cloudsmith\n\n**with-cloudsmith** is a CLI tool for temporarily injecting Cloudsmith package\nsource configurations into an environment. This can be useful when you want\nto consume private packages as part of a Dockerfile build but do not want to\nleave credentials behind in the resulting image.\n\nSupported registry types:\n\n- Debian\n- Pip (Python)\n- Composer (PHP)\n\n## Use\n\n```text\nUsage: with-cloudsmith [options] [--] command\n\n  Set up private Cloudsmith registries temporarily.\n\nOptions:\n  -r, --repo \u003crepo\u003e       Cloudsmith repository name\n  -o, --org \u003corg\u003e         Cloudsmith organization name\n  -v, --verbose           Enable verbose output\n  -vv                     Enable debug output\n  -s, --silent            Silence output\n  --pip                   Enable PIP registry\n  --deb                   Enable Debian registry\n  -k, --keep              Keep temporary files\n  -h, --help              Show this help message\n```\n\nFirst, add **with-cloudsmith** to your Dockerfile:\n```dockerfile\nFROM debian:bookworm-slim\n\nADD --chmod=555 https://raw.githubusercontent.com/secondlife/with-cloudsmith/v0.1.0/with-cloudsmith /usr/bin/\n```\n\n## Debian\n\nTo install debian packages from a private Cloudsmith repository:\n```dockerfile\n# Install cloudsmith apt source dependencies\nRUN apt-get update \\\n    \u0026\u0026 apt-get install -y apt-transport-https ca-certificates curl gnupg \\\n    \u0026\u0026 rm -rf /var/lib/apt/lists/*\n\n# Install private dependencies\nRUN --mount=type=secret,id=CLOUDSMITH_API_KEY \\\n    with-cloudsmith -v --repo REPO --org ORG --deb \\\n    apt-get install -y PACKAGE \\\n    \u0026\u0026 rm -rf /var/lib/apt/lists/*\n```\n\nThen, assuming you have the environment variable CLOUDSMITH_API_KEY available, build the image:\n```\n$ docker build --secret id=CLOUDSMITH_API_KEY local/example .\n```\n\n## Pip\n\nPrivate python packages can be installed using **with-cloudsmith** like so:\n\n```dockerfile\nRUN --mount=type=secret,id=CLOUDSMITH_API_KEY \\\n    with-cloudsmith --repo REPO --org ORG --pip pip install ...\n```\n\nBuild the image the same as before, passing a build `--secret`.\n\n## Credentials\n\n**with-cloudsmith** desperately searches the following locations for credentials:\n\n- Environment variables: `CLOUDSMITH_API_KEY`, `CLOUDSMITH_TOKEN`, `CLOUDSMITH_USER`, `CLOUDSMITH_PASSWORD`\n    - Format Specific Environment Variables\n    - Composer: `CLOUDSMITH_COMPOSER_ALT_DOMAIN`\n- Ini files: `$HOME/.cloudsmith/credentials.ini`, `$HOME/.config/credentials.ini`, `$PWD/credentials.ini`\n- Docker build secrets: `/run/secrets/CLOUDSMITH_API_KEY`, et al.\n- `/run/secrets/cloudsmith`: A special file that can either be your cloudsmith-cli credentials.ini or a source-able dotenv.\n\n## Tips and tricks\n\nLet's say you want to inspect private packages for awhile, perhaps to query\nand search dependencies. You have two options:\n\n```sh\n# Keep the private sources around:\nwith-cloudsmith --keep ...\n\n# Create a subshell:\nwith-cloudsmith bash\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecondlife%2Fwith-cloudsmith","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsecondlife%2Fwith-cloudsmith","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecondlife%2Fwith-cloudsmith/lists"}