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. Aug 28, 2024
  2. Aug 22, 2024
  3. Apr 30, 2024
  4. Apr 22, 2024
  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. Aug 19, 2021
  7. Mar 17, 2021
  8. Oct 15, 2020
    • Zeger-Jan van de Weg's avatar
      tests: Replace assert with require · 308948b3
      Zeger-Jan van de Weg authored
      Testify features sub packages `assert` and `require`. The difference is
      subtle, and lost on novice Golang developers that don't read the docs.
      To create a more consistent code base `assert` will no longer be used.
      
      This change was generated by a running a sed command on all `_test.go`
      files, followed by `goimports -w`.
      308948b3
  9. Sep 21, 2020
    • Stan Hu's avatar
      Make it possible to propagate correlation ID across processes · a487572a
      Stan Hu authored
      Previously, gitlab-shell did not pass a context through the application.
      Correlation IDs were generated down the call stack instead of passed
      around from the start execution.
      
      This has several potential downsides:
      
      1. It's easier for programming mistakes to be made in future that lead
      to multiple correlation IDs being generated for a single request.
      2. Correlation IDs cannot be passed in from upstream requests
      3. Other advantages of context passing, such as distributed tracing is
      not possible.
      
      This commit changes the behavior:
      
      1. Extract the correlation ID from the environment at the start of
      the application.
      2. If no correlation ID exists, generate a random one.
      3. Pass the correlation ID to the GitLabNet API requests.
      
      This change also enables other clients of GitLabNet (e.g. Gitaly) to
      pass along the correlation ID in the internal API requests
      (https://gitlab.com/gitlab-org/gitaly/-/issues/2725).
      
      Fixes https://gitlab.com/gitlab-org/gitlab-shell/-/issues/474
      a487572a
  10. 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
  11. May 04, 2020
  12. Oct 18, 2019
  13. Jul 31, 2019
    • Patrick Bajao's avatar
      Rename CommandArgs to Shell · 592823d5
      Patrick Bajao authored
      Other functions are still expecting for `CommandArgs` instead
      of `Shell`. They should be expecting `commandargs.Shell` now
      since it has been renamed.
      592823d5
  14. May 31, 2019
  15. Apr 24, 2019
  16. Mar 21, 2019
  17. Mar 15, 2019
  18. Mar 14, 2019
    • Bob Van Landuyt's avatar
      Detect user based on key, username or id · 53511f36
      Bob Van Landuyt authored
      This allows gitlab-shell to be called with an argument of the format
      `key-123` or `username-name`.
      
      When called in this way, `gitlab-shell` will call the GitLab internal
      API. If the API responds with user information, it will print a
      welcome message including the username.
      
      If the API responds with a successful but empty response, gitlab-shell
      will print a welcome message for an anonymous user.
      
      If the API response includes an error message in JSON, this message
      will be printed to stderr.
      
      If the API call fails, an error message including the status code will
      be printed to stderr.
      53511f36
Loading