{"id":19654636,"url":"https://github.com/gaultier/gitlab-clone-all","last_synced_at":"2025-04-28T17:32:21.910Z","repository":{"id":207552698,"uuid":"431902626","full_name":"gaultier/gitlab-clone-all","owner":"gaultier","description":"Clone locally all git projects from Gitlab.","archived":true,"fork":false,"pushed_at":"2022-05-06T06:24:49.000Z","size":75,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T01:54:49.624Z","etag":null,"topics":["git","gitlab","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gaultier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-11-25T16:00:55.000Z","updated_at":"2024-11-01T19:16:36.000Z","dependencies_parsed_at":"2023-11-16T12:29:30.621Z","dependency_job_id":"260f3e57-175b-4659-ad9c-1dd78c4a188e","html_url":"https://github.com/gaultier/gitlab-clone-all","commit_stats":null,"previous_names":["gaultier/gitlab-clone-all"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaultier%2Fgitlab-clone-all","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaultier%2Fgitlab-clone-all/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaultier%2Fgitlab-clone-all/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaultier%2Fgitlab-clone-all/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gaultier","download_url":"https://codeload.github.com/gaultier/gitlab-clone-all/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251355602,"owners_count":21576385,"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","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":["git","gitlab","rust"],"created_at":"2024-11-11T15:17:56.604Z","updated_at":"2025-04-28T17:32:21.662Z","avatar_url":"https://github.com/gaultier.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gitlab-clone-all\n\nClone locally all git projects from Gitlab. This is handy for example to search locally with `ripgrep` very quickly, or hack on projects.\n\nEvery project is cloned concurrently for maximum performance and the memory usage remains under 70MiB even with thousands of big projects.\n\n## Usage\n\n*The api token is optional. Without it, only publicly accessible repositories can be cloned. Go to https://gitlab.custom.com/-/profile/personal_access_tokens to create one with `read_api` and `read_repository` access.*\n\nUsage:\n\n```\nClone all git repositories from gitlab\n\nUSAGE:\n    gitlab-clone-all [OPTIONS]\n\nOPTIONS:\n    -a, --api-token \u003cAPI_TOKEN\u003e          [default: ]\n    -c, --clone-method \u003cCLONE_METHOD\u003e    [default: https] [possible values: https, ssh]\n    -d, --directory \u003cDIRECTORY\u003e          Root directory where to clone all the projects [default: .]\n    -h, --help                           Print help information\n    -u, --url \u003cURL\u003e                      [default: gitlab.com]\n```\n\nBuild:\n\n```sh\n# Requires rust, libgit2 \u0026 openssl e.g. `brew install openssl libgit2 rust`\n$ cargo build --release\n```\n\nSimple usage (the exact output will be different for you):\n\n```sh\n$ ./target/release/gitlab-clone-all --directory=/tmp\n...\n✓ youlysses/pmm-theme (2.5 KB, 6 objects)\n✓ dkrikun/someproj (531 B, 5 objects)\n✓ naggie/averclock (37.8 KB, 268 objects)\n✓ rocksoniko/easy (305 B, 3 objects)\n✓ diverops/hello-again (678 B, 6 objects)\n✓ leberwurscht/teardownwalls (268.7 KB, 932 objects)\n✓ hcs/hcs_utils (250.2 KB, 858 objects)\n✓ alessioalex/pushover (428.8 KB, 738 objects)\n✓ thanhtam1612/xdpm2010 (1.1 KB, 12 objects)\n✓ brad_richards/math-stuff (671.5 KB, 1415 objects)\n...\n\nSuccessfully cloned: 299/300 (1.7 GB)\nDuration: 270.068645291s\n```\n\nComplex usage:\n\n```sh\n$ ./target/release/gitlab-clone-all --api-token \u003cAPI_TOKEN\u003e --clone-method=ssh --directory=/tmp/ --url=gitlab.custom.com\n```\n\n## Development\n\n```sh\n# Adapt for your platform\n$ brew install rust openssl libgit2\n\n# Optional verbose logs\n$ export RUST_LOG=debug\n\n$ cargo run -- --api-token=\"$GITLAB_API_TOKEN\" --directory=/tmp/$(date +%s) --clone-method=ssh\n```\n\n## Docker\n\n*Due to limitations of git/Gitlab/the current capabilities of the project, running the app in Docker won't work if authentication is required without extra work (that's because you need to copy your ssh private key into the container).*\n\n```sh\n$ docker build -t gitlab-clone-all:latest .\n$ docker run -it gitlab-clone-all:latest gitlab-clone-all --directory=/tmp/\n```\n\n## Roadmap\n\n- [ ] Retrying\n- [ ] `--me` option to only clone my repositories\n- [ ] Stop if no project could be fetched from the Gitlab API at all\n- [ ] Max network rate CLI option\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaultier%2Fgitlab-clone-all","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgaultier%2Fgitlab-clone-all","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaultier%2Fgitlab-clone-all/lists"}