summaryrefslogtreecommitdiff
path: root/spec/gitlab_shell_gitlab_shell_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Simplify integration specsNick Thomas2019-10-151-147/+0
|
* Add Executable struct181-migrate-gitlab-shell-checks-fallbackPatrick Bajao2019-08-021-2/+2
| | | | | | | | | | 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.
* Provide go implementation for 2fa_recovery_codes commandIgor2019-03-211-56/+10
|
* Detect user based on key, username or idBob Van Landuyt2019-03-141-8/+25
| | | | | | | | | | | | | | | | | | 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.
* Don't fall back to ruby for non SSH connectionsbvl-feature-flag-commandsBob Van Landuyt2019-01-151-20/+24
| | | | | When SSH_CONNECTION is not set, we don't fall back to ruby, but instead fail directly in go writing the error to stderr.
* Allow enabling gitlab-shell "discover"-featureBob Van Landuyt2019-01-151-52/+82
| | | | | | | | | | | | | | | | | | | 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
* Revert "Merge branch 'sh-bump-ruby-version' into 'master'"Douwe Maan2018-12-131-5/+3
| | | This reverts merge request !257
* Upgrade to Ruby 2.5.3Stan Hu2018-12-131-3/+5
|
* Remove mistaken support for `gitlab-shell user-123`gitlab-shell-no-glid-argumentJacob Vosmaer2018-09-281-21/+0
|
* Harden gitlab-shell against arguments following the gl_id parameter in the ↵Nick Thomas2018-08-091-3/+3
| | | | command line
* Fix two regressions in SSH certificate supportÆvar Arnfjörð Bjarmason2018-08-081-0/+163
Fix two regressions in my 2e8b670 ("Add support for SSH certificate authentication", 2018-06-14) merged in gitlab-org/gitlab-shell!207. This fixes the issue noted in gitlab-org/gitlab-shell#145 where the command-line contains things other than the key/user/username, and also a regression where SSH certificates are being used, and the username presented in the key is unknown to GitLab. In that case, we should log the user in as "Anonymous" (on an instance that allows public access), but because of how the error checking around api.discover() was implemented we ended up erroring out instead.