summaryrefslogtreecommitdiff
path: root/bin/gitlab-shell
Commit message (Collapse)AuthorAgeFilesLines
* Initial feature-flagged go/ruby switchNick Thomas2018-09-281-28/+0
|
* Harden gitlab-shell against arguments following the gl_id parameter in the ↵Nick Thomas2018-08-091-1/+1
| | | | command line
* Fix two regressions in SSH certificate supportÆvar Arnfjörð Bjarmason2018-08-081-1/+5
| | | | | | | | | | | | | | | 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.
* Add support for SSH certificate authenticationÆvar Arnfjörð Bjarmason2018-07-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This along with the code submitted to gitlab-ce in the gitlab-org/gitlab-ce! MR implements SSH certificate authentication. See the docs added to gitlab-ce for why and how to enable this. This, along with that MR, closes gitlab-org/gitlab-ce#3457 Implementation notes: - Because it's easy to do, and because an earlier nascent version of this would pass user-ID to gitlab-shell, that's now supported, even though the SSH certificate authentication uses username-USERNAME. - The astute reader will notice that not all the API calls in gitlab-ce's lib/api/internal.rb support a "username" argument, some only support "user_id". There's a few reasons for this: a) For this to be efficient, I am bending over backwards to avoid extra API calls when using SSH certificates. Therefore the /allowed API call will now return a "user id" to us if we're allowed to proceed further. This is then fed to existing APIs that would only be called after a successful call to /allowed. b) Not all of the git-shell codepaths go through /internal/allowed, or ever deal with a repository, e.g. the argument-less "Welcome to GitLab", and /internal/2fa_recovery_codes. These need to use /internal/discover to figure out details about the user, so support looking that up by username. c) Once we have the "user id", the GL_ID gets passed down to e.g. user-authored hooks. I don't want to have those all break by having to handle a third GL_ID mode of "username" in addition to the current "key id" and "user id".
* Revert "Merge branch 'sh-disable-rubygems' into 'master'"Stan Hu2017-07-051-1/+1
| | | | | This reverts commit a18c90128e4d3eeae1233b1bc3c3998afd223c0d, reversing changes made to 0a64624152735766c428d1532e434dd0bf5a9748.
* Disable RubyGems to increase performanceStan Hu2017-07-031-1/+1
| | | | | | By default, RubyGems is enabled, which causes the Ruby interpreter to load 600+ additional files at startup when gitlab-shell is designed not to use any external gems.
* More ENV.deleteJacob Vosmaer2016-07-201-1/+1
|
* Limit availability of SSH_ORIGINAL_COMMANDJacob Vosmaer2015-11-251-1/+1
| | | | | Hoping this makes it more obvious when code touches the very unsafe contents of this variable.
* GitlabShell doesn't need to set GL_ID at all.Douwe Maan2015-04-061-1/+4
|
* Write GitlabShell error to stderr.nice-error-messageDouwe Maan2015-04-061-2/+5
|
* gitlab-initDmitriy Zaporozhets2013-02-051-1/+5
|
* working git uploadDmitriy Zaporozhets2013-02-031-4/+7
|
* gitlab-shell binmDmitriy Zaporozhets2013-02-031-0/+11