- Aug 30, 2024
-
-
Archish authored
-
- Aug 14, 2024
-
-
Ash McKenzie authored
-
- Sep 01, 2023
-
-
Ash McKenzie authored
-
- Jul 10, 2023
-
-
Ash McKenzie authored
-
Ash McKenzie authored
-
Ash McKenzie authored
-
- Jul 04, 2023
-
-
Ash McKenzie authored
-
- Jul 05, 2022
-
-
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
-
- Sep 08, 2021
- Aug 04, 2021
-
-
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
-
- May 17, 2021
-
-
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
-
- Mar 15, 2021
-
-
Lucas Charles authored
Refactors introspection of execution environment to rely on per-connection state (`gitlab-shell`) or per request (`gitlab-sshd`) Relates to https://gitlab.com/gitlab-org/gitlab-shell/-/issues/496
-
- Jan 18, 2021
-
-
Lorenz Brun authored
-
- Sep 21, 2020
-
-
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
-
- Mar 11, 2020
-
-
Stan Hu authored
This restores the previous behavior of logging the success and failures of internal HTTP requests. Part of https://gitlab.com/gitlab-org/gitlab/issues/207916
-
- Oct 18, 2019
-
-
Nick Thomas authored
-
Nick Thomas authored
-
- Oct 08, 2019
-
-
Nick Thomas authored
-
- Sep 20, 2019
-
-
Nick Thomas authored
-
- Aug 15, 2019
-
-
Patrick Bajao authored
We had `gitlab-shell-authorized-keys-check` and `gitlab-shell-authorized-principals-check` as symlinks to `gitlab-shell` before. We determine the `Command` and `CommandArgs` that we build based on the `Name` of the `Executable`. We also use that to know which fallback ruby executable should we fallback to. We use `os.Executable()` to do that. `os.Executable()` behaves differently depending on OS. It may return the symlink or the target's name. That can result to a buggy behavior. The fix is to create binaries for each instead of using a symlink. That way we don't need to rely on `os.Executable()` to get the name. We pass the `Name` of the executable instead.
-
- Aug 02, 2019
-
-
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.
-
- Jul 29, 2019
-
-
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).
-
- Jun 04, 2019
-
-
Nick Thomas authored
-
- May 20, 2019
-
-
Igor Drozdov authored
-
- Apr 12, 2019
-
-
Nick Thomas authored
-
Nick Thomas authored
Credit to https://gitlab.com/ejiek for spotting this one.
-
- Mar 21, 2019
-
-
Igor Drozdov authored
-
- Mar 15, 2019
-
-
Bob Van Landuyt authored
The reporter struct can be used for passing around and reporting to the io.Writer of choice.
-
- Jan 15, 2019
-
-
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.
-
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
-
- Sep 28, 2018
-
-
Nick Thomas authored
-
Nick Thomas authored
-
Nick Thomas authored
-