- Sep 29, 2024
-
-
Archish Thakkar authored
-
- Mar 27, 2024
-
- Oct 06, 2023
-
-
Igor Drozdov authored
The allowed commands must be scoped to namespaces: - git push/pull/archive - git lfs authenticate
-
- Jan 23, 2023
-
-
- 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
-
- Nov 11, 2021
-
-
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
-
- Sep 27, 2021
-
-
Nick Thomas authored
-
- Jun 29, 2021
-
-
Robert May authored
-
- 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
-
- Dec 10, 2020
-
-
Imre Farkas authored
-
- Aug 17, 2020
-
-
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 ```
-
- Feb 28, 2020
-
-
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.
-
- Oct 18, 2019
-
-
Nick Thomas authored
-
- 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 31, 2019
-
-
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.
-
- 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 06, 2019
-
-
Igor Drozdov authored
-
- Jun 05, 2019
-
-
Igor Drozdov authored
-
- Jun 03, 2019
-
-
Igor Drozdov authored
-
- May 31, 2019
-
-
Igor Drozdov authored
-
- Mar 21, 2019
-
-
Igor Drozdov authored
-
- 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
-