Cloning Repositories#
During the process of building documentation, the script clones Git repositores into the permanent storage directory as needed. In case you need to clone repositories manually, you can use the following commands:
$ docbuild repo clone [OPTIONS] REPO [REPO ...]
The REPO
argument can be specified in various formats, such as:
A full URL like
https://github.com/org/repo.git
.An SSH URL like
git@github.com:org/repo.git
.An abbreviated URL like
SERVICE://org/repo
. Currently the following service prefixes are supported:gh://
for GitHubgl://
for GitLabgls://
for GitLab SUSE (gitlab.suse.de)bb://
for Bitbucketghe://
for GitHub Enterprisegt://
for Giteacb://
for Codeberg
An abbreviated name like
org/repo
which defaults to GitHub.
All notations are treated the same and normalized. That includes transforming the URL to lowercase and removing trailing slashes.
For example, to clone the https://github.com/SUSE/doc-modular.git
repository, the following notations are equivalent:
$ docbuild repo clone https://github.com/SUSE/doc-modular.git
$ docbuild repo clone gh://SUSE/doc-modular
$ docbuild repo clone gh://suse/doc-modular
$ docbuild repo clone SUSE/doc-modular
The command will clone the repository into the permanent storage directory. You can find the exact path by running:
$ docbuild repo dir
/var/cache/docbuild/repos/permanent-full/
To get a list of all available repositories in the permanent storage, use:
$ docbuild repo list