Need help with gitlab-shell?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

478 Stars 294 Forks Other 1.6K Commits 47 Opened issues


Replacement for gitolite. This repo is a mirror of

Services available


Need anything else?

Contributors list

GitLab Shell

GitLab Shell handles git SSH sessions for GitLab

GitLab Shell handles git SSH sessions for GitLab and modifies the list of authorized keys. GitLab Shell is not a Unix shell nor a replacement for Bash or Zsh.

When you access the GitLab server over SSH then GitLab Shell will:

  1. Limits you to predefined git commands (git push, git pull).
  2. Call the GitLab Rails API to check if you are authorized, and what Gitaly server your repository is on
  3. Copy data back and forth between the SSH client and the Gitaly server

If you access a GitLab server over HTTP(S) you end up in gitlab-workhorse.

An overview of the four cases described above:

  1. git pull over SSH -> gitlab-shell -> API call to gitlab-rails (Authorization) -> accept or decline -> establish Gitaly session
  2. git push over SSH -> gitlab-shell (git command is not executed yet) -> establish Gitaly session -> (in Gitaly) gitlab-shell pre-receive hook -> API call to gitlab-rails (authorization) -> accept or decline push

Code status

pipeline status coverage report Code Climate


GitLab Shell is written in Go, and needs a Go compiler to build. It still requires Ruby to build and test, but not to run.

Download and install the current version of Go from

We follow the Golang Release Policy of supporting the current stable version and the previous two major versions.


make setup


Checks if GitLab API access and redis via internal API can be reached:

make check


Run tests:

bundle install
make test

Run gofmt:

make verify

Run both test and verify (the default Makefile target):

bundle install
make validate

Git LFS remark

Starting with GitLab 8.12, GitLab supports Git LFS authentication through SSH.

Releasing a new version

GitLab Shell is versioned by git tags, and the version used by the Rails application is stored in


For each version, there is a raw version and a tag version:

  • The raw version is the version number. For instance,
  • The tag version is the raw version prefixed with
    . For instance,

To release a new version of GitLab Shell and have that version available to the Rails application:

  1. Create a merge request to update the
    with the tag version and the
    file with the raw version.
  2. Ask a maintainer to review and merge the merge request. If you're already a maintainer, second maintainer review is not required.
  3. Add a new git tag with the tag version.
  4. Update
    in the Rails application to the raw version. (Note: this can be done as a separate MR to that, or in and MR that will make use of the latest GitLab Shell changes.)





We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.