Bucketcloner
Simple tool to list all your bitbucket workspaces and clone (all) repositories associated with these workspaces.
Requirements
- You need to know your Bitbucket account email. Can be found at https://bitbucket.org/account/settings/email/.
- You need to create an API token here https://id.atlassian.com/manage-profile/security/api-tokens with read permissions for account, workspace membership and repositories.
| Command | Scopes |
|---|---|
| workspace | read:user:bitbucket, read:workspace:bitbucket |
| clone | read:user:bitbucket, read:workspace:bitbucket, read:repository:bitbucket |
| project | read:user:bitbucket, read:workspace:bitbucket, read:project:bitbucket |
Install bucketcloner either by cloning this repository and running pip install . or by installing it via pip install bucketcloner. Minimum required python version is 3.9.
Alternatively, you can run bucketcloner using uvx: uvx bucketcloner --help
Authentication for cloning the repository can be done via https and the API token or using an SSH key. IMPORTANT: When using ssh make sure you have added the bitbucket server ssh fingerprint to the known hosts, otherwise the command will fail. Run git clone git@bitbucket.org:... once manually to make sure the key is added.
You can pass your ssh key with --ssh-key, otherwise the users default ssh key will be used.
List all workspaces
bucketcloner -e <email> -t <api_token> workspace
This lists all workspaces, including your personal workspace, where you have access.
Clone workspace(s)
You can clone all repositories of all workspaces by simply calling
bucketcloner -e <email> -t <api_token> clone
This clones all repositories of all workspaces into the folders workspace/repository relative to the current directory.
To select specific workspace(s), add the -w option with workspace slug names separated by commas
bucketcloner -e <email> -t <api_token> -w workspace1,workspace2 clone
All existing repositories in the folders will be deleted and cloned again. To just skip existing repositories, add --skip-existing flag.
bucketcloner -e <email> -t <api_token> -w workspace1,workspace2 --skip-existing clone
Clone all repos from all workspaces with project PRO1 into /tmp with folder structure workspace/project/repo.
bucketcloner -e <email> -t <api_token> --project PRO1 --base-folder /tmp --project-folder clone
Clone all repos using an ssh key
bucketcloner -e <email> -t <api_token> --base-folder /tmp --auth-mode ssh --ssh-key "/my/id_rsa" clone
List all projects in all workspaces
bucketcloner -e <email> -t <api_token> project
Python example
The example.ipynb includes an example how to read the workspaces and download the repositories from within python.
Metadata
Release files for bucketcloner 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bucketcloner-0.3.1.tar.gz | 5.5 kB | With provenance | Details for bucketcloner-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bucketcloner-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for bucketcloner-0.3.1-py3-none-any.whl |
Total release size: 12.1 kB
Release files / bucketcloner-0.3.1.tar.gz
| Download URL | bucketcloner-0.3.1.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f63b4e6010ac89cdc6497b6adc460556cac5edb44458c78f2e43f48dc7b41932
|
|
BLAKE2b-256 checksum How to use checksums |
0642393b21ef9de7f3fb3522df0cb99cadbd650784d7093f492983fc05d264ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency logRelease files / bucketcloner-0.3.1-py3-none-any.whl
| Download URL | bucketcloner-0.3.1-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3890248c662439cb9700e1ca3bcb80809666bcc5881bc8e7cd1ab1129bffe71f
|
|
BLAKE2b-256 checksum How to use checksums |
b5f0f10b0b2e34f97c1489dea04c76fc2b6dd4e9e6bedba214519ce867b42195
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency logSecurity for bucketcloner 0.3.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for bucketcloner-0.3.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency logA 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.