As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
  1. Sep 29, 2024
  2. Mar 27, 2024
  3. Oct 06, 2023
  4. Jan 23, 2023
  5. Jul 05, 2022
    • Patrick Steinhardt's avatar
      go: Bump major version to v14 · 822e49b3
      Patrick Steinhardt authored
      While gitlab-shell currently has a major version of v14, the module path
      it exposes is not using that major version like it is required by the Go
      standard. This makes it impossible for dependents to import gitlab-shell
      as a dependency without using a commit as version.
      
      Fix this by changing the module path of gitlab-shell to instead be
      `gitlab.com/gitlab-org/gitlab-shell/v14` and adjust all imports
      accordingly.
      
      Changelog: fixed
      822e49b3
  6. Nov 11, 2021
    • Stan Hu's avatar
      Relax key and username matching for sshd · 672013e7
      Stan Hu authored
      Due to the way sshd works, gitlab-shell could be called with a single
      string in the form:
      
      ```
      /path/to/gitlab-shell -c key-id
      ```
      
      However, due to the tightening of the regular expressions in fcff692b
      this string no longer matches, so logins would fail with:
      
      ```
      Failed to get username: who='' is invalid
      ```
      
      This can be reproduced by changing the user's shell to point to
      gitlab-shell. For example:
      
      ```
      usermod git -s /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell
      ```
      
      While setting gitlab-shell as the user's shell isn't officially
      supported, gitlab-shell still should be able to cope with the key being
      specified as the last argument. We now split the argument list and use
      the last value.
      
      Relates to https://gitlab.com/gitlab-org/gitlab-shell/-/issues/530
      Unverified
      672013e7
  7. Sep 27, 2021
  8. Jun 29, 2021
  9. Mar 15, 2021
  10. Jan 18, 2021
  11. Dec 10, 2020
  12. Aug 17, 2020
    • Taylan Develioglu's avatar
      Add support obtaining personal access tokens via SSH · b8d66d79
      Taylan Develioglu authored
      Implements the feature requested in gitlab-org/gitlab#19672
      
      This requires the internal api counterpart in gitlab-org/gitlab!36302 to
      be merged first.
      
      It can be used as follows:
      ```
      censored@censored-VirtualBox:~/git/gitlab$ ssh git@gitlab-2004 personal_access_token
      remote:
      remote: ========================================================================
      remote:
      remote: Usage: personal_access_token <name> <scope1[,scope2,...]> [ttl_days]
      remote:
      remote: ========================================================================
      remote:
      
      censored@censored-VirtualBox:~/git/gitlab$ ssh git@gitlab-2004 personal_access_token newtoken read_api,read_repository 30
      Token:   aAY1G3YPeemECgUvxuXY
      Scopes:  read_api,read_repository
      Expires: 2020-08-07
      ```
      b8d66d79
  13. Feb 28, 2020
    • Patrick Steinhardt's avatar
      commands: pass through GIT_PROTOCOL envvar provided by clients · cab69fad
      Patrick Steinhardt authored
      Both git-upload-pack and git-receive-pack services inspect the
      GIT_PROTOCOL environment transferred via SSH in order to decide which
      protocols are supported by a given client. Currently, we don't use the
      environment variable at all, though, but instead forward the GitProtocol
      field of the access verification response.
      
      Improve this by passing on the GIT_PROTOCOL environment variable
      provided by the client as-is.
      cab69fad
  14. Oct 18, 2019
  15. Aug 02, 2019
    • Patrick Bajao's avatar
      Add Executable struct · 3b6f9f75
      Patrick Bajao authored
      This struct is responsible for determining the name and
      root dir of the executable.
      
      The `RootDir` property will be used to find the config.
      
      The `Name` property will be used to determine what `Command`
      and `CommandArgs` to be built.
      3b6f9f75
  16. Jul 31, 2019
    • Patrick Bajao's avatar
      Support different CommandArgs type · 3b0176df
      Patrick Bajao authored
      `CommandArgs` has been renamed to `Shell`.
      
      An interface has been added that includes `Executable()` and
      `Arguments()` method. The `BaseArgs` implement this methods
      and should be embeeded in each type.
      3b0176df
  17. Jul 29, 2019
    • Patrick Bajao's avatar
      Support falling back to ruby version of checkers · aab85f36
      Patrick Bajao authored
      Rename the ruby scripts to have `-ruby` suffix and add a symlink
      for both to `./gitlab-shell`. The executable name will be used to
      determine how args will be parsed.
      
      For now, we only parse the arguments for gitlab-shell commands. If
      the executable is `gitlab-shell-authorized-keys-check` or
      `gitlab-shell-authorized-principals-check`, it'll always fallback
      to the ruby version.
      
      Ruby specs test the ruby script, the fallback from go to ruby and
      go implementation of both (still pending).
      aab85f36
  18. Jun 06, 2019
  19. Jun 05, 2019
  20. Jun 03, 2019
  21. May 31, 2019
  22. Mar 21, 2019
  23. Jan 15, 2019
    • Bob Van Landuyt's avatar
      Don't fall back to ruby for non SSH connections · d762f4ec
      Bob Van Landuyt authored
      When SSH_CONNECTION is not set, we don't fall back to ruby, but
      instead fail directly in go writing the error to stderr.
      d762f4ec
    • Bob Van Landuyt's avatar
      Allow enabling gitlab-shell "discover"-feature · 7215126b
      Bob Van Landuyt authored
      This adds the possibility to enable features for GitLab shell.
      
      The first feature being recognized is "Discover": It's the command
      that is executed when running `ssh git@gitlab.example.com` and is
      called without a command.
      
      The gitlab key id or username is already parsed from the command line
      arguments.
      
      Currently we only support communicating with GitLab-rails using unix
      sockets. So features will not be enabled if the GitLab-url is using a
      different protocol. The url for this read from the config yaml.
      
      Pending ruby-specs have been added for the gitlab-shell command.
      
      Refactor to have separate command packages
      7215126b
Loading