.nh .TH "glab" "1" "Jul 2026" "Auto generated by spf13/cobra" "" .SH NAME glab-repo-clone - Clone a GitLab repository or project. .SH SYNOPSIS \fBglab repo clone [ | -g ] [] [flags] [-- \&...]\fP .SH DESCRIPTION Clone a GitLab repository to your local machine. Specify the repository by name, namespace/repo path, full URL, or project ID. .PP The command uses your configured protocol (SSH or HTTPS). .PP To pass Git clone flags, add them after \fB--\fR\&. For example: \fBglab repo clone -- --branch \fR .PP When you clone a fork you own, the command adds an \fBupstream\fR remote that points to the parent project. .SH OPTIONS \fB-g\fP, \fB--group\fP="" Specify the group to clone repositories from. .PP \fB-p\fP, \fB--preserve-namespace\fP[=false] Clone the repository in a subdirectory based on namespace. .PP \fB--active\fP[=false] Limit by project status. When true, returns active projects. When false, returns projects that are archived or marked for deletion. Used with the --group flag. .PP \fB-a\fP, \fB--archived\fP[=false] Limit by archived status. Use with '-a=false' to exclude archived repositories. Used with the --group flag. .PP \fB-G\fP, \fB--include-subgroups\fP[=true] Include projects in subgroups of this group. Default is true. Used with the --group flag. .PP \fB-m\fP, \fB--mine\fP[=false] Limit by projects in the group owned by the current authenticated user. Used with the --group flag. .PP \fB-v\fP, \fB--visibility\fP="" Limit by visibility: public, internal, private. Used with the --group flag. .PP \fB-I\fP, \fB--with-issues-enabled\fP[=false] Limit by projects with the issues feature enabled. Default is false. Used with the --group flag. .PP \fB-M\fP, \fB--with-mr-enabled\fP[=false] Limit by projects with the merge request feature enabled. Default is false. Used with the --group flag. .PP \fB-S\fP, \fB--with-shared\fP[=true] Include projects shared to this group. Default is true. Used with the --group flag. .PP \fB--paginate\fP[=false] Make additional HTTP requests to fetch all pages of projects before cloning. Respects --per-page. .PP \fB--page\fP=1 Page number. .PP \fB--per-page\fP=30 Number of items to list per page. .SH OPTIONS INHERITED FROM PARENT COMMANDS \fB-h\fP, \fB--help\fP[=false] Show help for this command. .SH EXAMPLE .EX # Clones repository into current directory glab repo clone gitlab-org/cli glab repo clone https://gitlab.com/gitlab-org/cli # Clones repository into 'mydirectory' glab repo clone gitlab-org/cli mydirectory # Clones repository 'glab' for current user glab repo clone glab # Finds the project by the ID provided and clones it glab repo clone 4356677 # Clones a specific branch glab repo clone gitlab-org/cli -- --branch development # Clones with a shallow clone (depth 1) glab repo clone gitlab-org/cli -- --depth 1 # Clones with multiple Git flags glab repo clone gitlab-org/cli -- --branch main --single-branch --depth 1 # Clones all repos in a group glab repo clone -g everyonecancontribute --paginate # Clones all non-archived repos in a group glab repo clone -g everyonecancontribute --archived=false --paginate # Clones only active projects in a group glab repo clone -g everyonecancontribute --active=true --paginate # Clones from a GitLab Self-Managed or GitLab Dedicated instance GITLAB_HOST=salsa.debian.org glab repo clone myrepo .EE .SH SEE ALSO \fBglab-repo(1)\fP