Download Spaces
Download Methods
A Space is essentially a Git repository and supports the following clone methods:
| Method | Use Case |
|---|---|
| HTTPS Git Clone | General-purpose download for all users |
| SSH Git Clone | Password-free download after SSH key configuration |
| csghub-cli | Suitable for Space repositories containing large files |
Download via HTTPS
git clone https://<platform-host>/<namespace>/<space-name>
For private Spaces, use an access token:
git clone https://<username>:<access-token>@<platform-host>/<namespace>/<space-name>
Download via SSH
After adding your SSH public key in User Settings → SSH Keys:
git clone ssh://git@<platform-host>/<namespace>/<space-name>
Download via csghub-cli
Install csghub-cli:
pip install csghub-sdk
Download a Space:
csghub-cli download <namespace>/<space-name> --repo_type space
Download via Python SDK
from pycsghub.snapshot_download import snapshot_download
space_path = snapshot_download(
repo_id="<namespace>/<space-name>",
repo_type="space",
endpoint="https://<platform-host>",
token="<access-token>" # Required for private Spaces
)
print(f"Space downloaded to: {space_path}")
Note
Access tokens can be generated in User Settings → Access Tokens.