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. May 11, 2023
  2. Apr 26, 2023
  3. Mar 17, 2023
  4. Mar 15, 2023
  5. Jan 23, 2023
  6. Nov 23, 2022
  7. Aug 05, 2022
    • Igor Drozdov's avatar
      Update Gitaly to v15 · 2c187671
      Igor Drozdov authored
      This commit also excludes gitlab-shell from dependencies:
      
      Gitaly specifies Gitlab Shell as a dependency as well in order
      to use gitlabnet client to perform API endpoints to Gitlab Rails.
      As a result, Gitlab Shell requires Gitaly -> Gitaly requires an
      older version of Gitlab Shell -> that version requires an older
      version of Gitlab Shell, etc. Let's use exclude to break the
      chain earlier
      2c187671
    • Igor Drozdov's avatar
      Fix failing TestGitReceivePackSuccess · 67345c2a
      Igor Drozdov authored
      After https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4766
      has been introduced, the test started fail because we basically
      cancel the git-receive-pack after the output is received
      
      This commit gracefully closes the connection to make the test
      pass
      67345c2a
  8. 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
  9. May 19, 2022
  10. May 05, 2022
  11. Apr 18, 2022
  12. Mar 07, 2022
    • Igor Drozdov's avatar
      Reuse Gitaly conns and Sidechannel · e1ddbdd1
      Igor Drozdov authored
      When gitlab-sshd has been introduced we've started running our
      own SSH server. In this case we're able to cache and reuse
      Gitaly connections and Registry.
      
      It helps to reduce memory usage.
      e1ddbdd1
  13. Dec 28, 2021
    • Will Chandler's avatar
      Suppress internal errors in client output · 3a8bab43
      Will Chandler authored
      Until recently, Gitaly was silently swallowing any errors returned by
      SSH `git upload-pack` processes. Clients would still receive stderr
      output and a non-zero return code, but Gitlab-Shell would receive error
      as nil and log success.
      
      With 9deaf47f1ecb00f0f36d18ee4a0fb1576f5a0efe Gitaly will now return an
      error when git fails, but this causes Gitlab-Shell to print out the
      GRPC error code as a message to the client:
      
      > fatal: couldn't find remote ref not-a-real-ref
      > fatal: the remote end hung up unexpectedly
      > remote:
      > remote:
      > ========================================================================
      > remote:
      > remote: rpc error: code = Internal desc = SSHUploadPack: exit status 128
      > remote:
      > remote:
      > ========================================================================
      > remote:
      
      The `remote:` text gives no additional context for the user and adds
      clutter.
      
      This commit suppresses the additional message added by Gitlab-Shell on
      failure when the error type is `Internal`, returning client output to
      the format it was prior to the Gitaly change.
      3a8bab43
  14. Dec 22, 2021
    • Will Chandler's avatar
      Send full git request/response in SSHD tests · 922bb8ff
      Will Chandler authored
      Before 9deaf47f1ecb00f0f36d18ee4a0fb1576f5a0efe, Gitaly would return
      success for `SSHUploadPack` and `SSHUploadArchive` regardless of the
      exit code of the `git upload-pack|archive` process. As a result, the
      gitlab-sshd acceptance tests could rely on no errors being returned from
      Gitaly.
      
      Currently these tests send the minimum request needed to start a
      session, causing the server git process to fail as the `0000` flush
      packet to end the session is never sent.
      
      This commit fixes the tests by sending the full request/response needed
      for a successful git operation.
      922bb8ff
  15. 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
  16. Oct 07, 2021
    • Nick Thomas's avatar
      Log command invocation · e77f0d06
      Nick Thomas authored
      Use reflection to log the command we are about to execute, both in
      gitlab-shell and gitlab-sshd. Include the environment, which has all
      the context we need to understand what the command is expected to do.
      
      Changelog: added
      e77f0d06
  17. Sep 27, 2021
  18. Sep 20, 2021
  19. Sep 15, 2021
  20. Sep 08, 2021
  21. Aug 19, 2021
  22. Aug 04, 2021
    • Nick Thomas's avatar
      Switch to labkit for logging system setup · 1274858f
      Nick Thomas authored
      - We start supporting the "color" format for logs.
      - We now respond to SIGHUP by reopening the log file.
      - We now respect the log format when no log filename is specified.
      
      Output to syslog in the event of logging system setup is preserved in
      OpenSSH mode.
      
      Changelog: added
      1274858f
  23. Jul 27, 2021
  24. Jul 26, 2021
  25. Jul 22, 2021
  26. Jul 19, 2021
  27. Jul 15, 2021
    • Igor Drozdov's avatar
      Shutdown sshd gracefully · 569a0197
      Igor Drozdov authored
      When interruption signal is sent, we are closing ssh listener to
      prevent it from accepting new connections
      
      Then after configured grace period, we cancel the context to
      cancel all ongoing operations
      569a0197
  28. Jul 14, 2021
  29. Jun 02, 2021
    • Pavlo Strokov's avatar
      fix: upgrade of the gitaly dependency · 9f5a8022
      Pavlo Strokov authored
      Gitaly project now properly respects module release flow
      and includes a module suffix in the package name. It requires
      to re-write all non-suffixed imports with suffixed of a specific
      version of tha module. With proper module versioning we don't
      need to use a 'replace' directive to point to specific commit
      and can use semantic versioning for the gitaly dependency.
      
      Part of: https://gitlab.com/gitlab-org/gitaly/-/issues/3177
      9f5a8022
  30. Jun 01, 2021
  31. May 20, 2021
  32. May 17, 2021
    • Nick Thomas's avatar
      Fix opentracing setup for gitlab-sshd · de13980f
      Nick Thomas authored
      Previously, opentracing (if configured) was initialized late in the
      gitlab-shell process's lifespan, coming just before making a gRPC
      call to Gitaly.
      
      By moving the opentracing initialization to be at process startup, we
      make it available for the whole process lifecycle, which is very useful
      to gitlab-sshd, as it means we'll only call tracing.Initialize() once
      on process startup, rather than once per SSH connection.
      
      To get this working, we need to introduce a context to gitlab-sshd.
      This carries the client/service name, but also carries an initial
      correlation ID. The main outcome of this is that all calls to the
      authorized_keys endpoint from a given gitlab-sshd process will now
      share a correlation ID. I don't have a strong opinion about this either
      way.
      
      Changelog: fixed
      de13980f
    • Sean McGivern's avatar
    • Sean McGivern's avatar
      Add acceptance test for 2fa_verify · 141d68c4
      Sean McGivern authored
      Unverified
      141d68c4
Loading