summaryrefslogtreecommitdiff
path: root/lib/gitlab_shell.rb
Commit message (Collapse)AuthorAgeFilesLines
* Update files to pass modern rubocop checks. Disable some of themdz-update-depsDmitriy Zaporozhets2018-02-221-11/+11
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Update rubocop and code to pass itDmitriy Zaporozhets2018-02-221-2/+2
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Remove special case treatment of Geo nodes for SSHStan Hu2018-01-121-9/+1
| | | | | | | We removed SSH support in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3553, so we no longer need the ability to show all refs for Geo nodes. Closes #115
* pass gl_username through to hooksDavid Turner2017-09-281-3/+6
|
* Fix SSH support for Git for Windows v2.14sh-fix-git-upload-packStan Hu2017-08-061-3/+12
| | | | | | | Git For Windows 2.14 has a patch that changes `git-upload-pack` to `git upload-pack`. To make this work for gitlab-shell, just map this to `git-upload-pack`. Closes gitlab-org/gitlab-ce#36028
* Use git_config_options instead of git_config_parameters for Gitaly requestssh-support-gitaly-upload-pack-unhide-refsStan Hu2017-08-031-7/+10
|
* Support unhiding of all refs for Geo NodesStan Hu2017-07-211-1/+6
| | | | | | By default, we hide certain refs (e.g. keep-around/XXX) to save user download time. We need to preserve these references on secondary Geo nodes to have a true copy.
* no more single-value mergeKim "BKC" Carlbäcker2017-07-071-3/+1
|
* metrics makes no sense because 'exec'Kim "BKC" Carlbäcker2017-07-071-4/+2
|
* hashes have .include? not .has?Kim "BKC" Carlbäcker2017-07-071-1/+1
|
* type-oKim "BKC" Carlbäcker2017-07-061-1/+1
|
* We need metrics loggingKim "BKC" Carlbäcker2017-07-061-2/+4
|
* no more attrsKim "BKC" Carlbäcker2017-07-061-1/+1
|
* - Update gitaly vendoringKim "BKC" Carlbäcker2017-07-031-4/+11
| | | | | - Wire up gitaly-*-pack to Gitaly. Don't pass git-*-pack to go - Disable tests for go1.5 & 1.6
* Make gitaly executable mapping clearergo-wrappersJacob Vosmaer2017-05-231-8/+12
|
* Explain chdirJacob Vosmaer2017-05-231-0/+1
|
* Use gitaly-upload-pack and gitaly-receive-packJacob Vosmaer2017-05-231-4/+24
|
* Handle GL_REPOSITORY env variable and use it in api callsAlejandro Rodríguez2017-05-111-3/+5
|
* Remove git annex supportPawel Chojnacki2017-02-241-41/+2
|
* Instrument GitLab Shell and log metrics data to a filePaco Guzman2016-10-111-5/+8
|
* Enable GIT_TRACE/GIT_TRACE_PACKET/GIT_TRACE_PERFORMANCE by providing the ↵59-git-tracingPaco Guzman2016-09-271-0/+26
| | | | | | git_trace_log_file config key The value of the variable if present must be a writable absolute path. If it’s not the case we log a proper message and not enable tracing to not throw output to the users.
* Style fixes and better tests.Patricio Cano2016-09-061-1/+1
|
* Refactored LFS auth logic to use its own API endpoint.Patricio Cano2016-09-061-5/+5
|
* Refactored JSON header generation to its own class and added tests for itPatricio Cano2016-09-061-10/+2
|
* Added LFS support to SSHPatricio Cano2016-09-061-1/+22
| | | | - Required changes to GitLab Shell include the actual handling of the `git-lfs-authenticate` command and the retrieval of the correct credentials.
* Add option to recover 2FA via SSHDrew Blessing2016-08-261-9/+47
|
* Add an error message when using shell commands with incompatible GitLab versionsAlejandro Rodríguez2016-07-061-0/+1
|
* Make use of a constant for the used SSH protocolPatricio Cano2016-07-051-2/+3
|
* Rename ENV['PROTOCOL'] to ENV['GL_PROTOCOL'] and make it mandatory with no ↵Patricio Cano2016-07-051-1/+1
| | | | fallback value
* Simplify protocol assign, and populate ENV['PROTOCOL'] variable when calling ↵Patricio Cano2016-07-051-1/+2
| | | | hooks via SSH
* Allow GitLab Shell to check for allowed access based on the used Git protocol.Patricio Cano2016-07-051-1/+1
|
* Refactor repository paths handling to allow multiple git mount pointsshardsAlejandro Rodríguez2016-06-291-29/+25
|
* get git annex to work when using custom SSH portJames Lopez2016-03-161-3/+2
|
* Merge branch 'stricter-exec_cmd' into 'master' Dmitriy Zaporozhets2015-12-011-12/+20
|\ | | | | | | | | | | | | | | Stricter exec cmd In response to the gitlab-shell 2.6.6-2.6.7 remote code execution vulnerability. See merge request !33
| * Add comment about untrusted origin_cmdstricter-exec_cmdJacob Vosmaer2015-11-261-0/+3
| |
| * Limit availability of SSH_ORIGINAL_COMMANDJacob Vosmaer2015-11-251-12/+10
| | | | | | | | | | Hoping this makes it more obvious when code touches the very unsafe contents of this variable.
| * Disallow execing stringsJacob Vosmaer2015-11-251-0/+7
| | | | | | | | Passing strings to Kernel::exec leads to remote code execution.
* | Merge branch 'y/git-home' into 'master' Dmitriy Zaporozhets2015-11-251-0/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass $HOME to git as well [ this patch has the same rationale and reasoning as https://gitlab.com/gitlab-org/gitlab-workhorse/commit/0d0bd209 details follow ] Git has 3 places for configs: - system - global (per user), and - local (per repository) System config location is hardcoded at git compile time (to usually $prefix/etc/gitconfig). Local configuration is usually picked because we pass full repo path to subcommand. But global configuration is currently not picked at all, because HOME env variable is not passed to git. Pass $HOME through and let git see it's "global" config. Currently GitLab omnibus stores gitlab user name/email + "autocrlf = true" in global config, so missing it should not be a blocker for receive/send-pack operations. But having it is more correct and can be handy in the future if/when more git operations are done from-under gitlab-shell. Having $HOME properly set is also needed when one cannot change system git config and have to put site-wide configuration into global git config under $HOME. That was the case I've hit and the reason for this patch. /cc @dzaporozhets, @jacobvosmaer See merge request !32
| * Pass $HOME to git as wellKirill Smelkov2015-11-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ this patch has the same rationale and reasoning as https://gitlab.com/gitlab-org/gitlab-workhorse/commit/0d0bd209 details follow ] Git has 3 places for configs: - system - global (per user), and - local (per repository) System config location is hardcoded at git compile time (to usually $prefix/etc/gitconfig). Local configuration is usually picked because we pass full repo path to subcommand. But global configuration is currently not picked at all, because HOME env variable is not passed to git. Pass $HOME through and let git see it's "global" config. Currently GitLab omnibus stores gitlab user name/email + "autocrlf = true" in global config, so missing it should not be a blocker for receive/send-pack operations. But having it is more correct and can be handy in the future if/when more git operations are done from-under gitlab-shell. Having $HOME properly set is also needed when one cannot change system git config and have to put site-wide configuration into global git config under $HOME. That was the case I've hit and the reason for this patch.
* | Revert "Run git-lfs-authenticate script with original command line arguments"Dmitriy Zaporozhets2015-11-251-2/+0
|/ | | | | | This reverts commit 8449979ff029af51be0c675c5b6262bc4adc8b3d. Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Merge branch 'master' of gitlab.com:gitlab-org/gitlab-shell into ↵Jacob Vosmaer2015-10-011-0/+3
|\ | | | | | | no-init-on-gcryptsetup
| * Merge branch 'bozaro/gitlab-shell-git-lfs-authenticate'Dmitriy Zaporozhets2015-09-101-0/+2
| |\ | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| | * Run git-lfs-authenticate script with original command line argumentsArtem V. Navrotskiy2015-09-091-0/+2
| | |
| * | Do not clean LANG environment variable for the git hooks when working ↵Artem V. Navrotskiy2015-09-091-0/+1
| |/ | | | | | | | | | | through the SSH-protocol When cleaning this environment variable can be problems with the processing of non-ASCII data
* | Skip 'git annex init' when using 'gcryptsetup'no-init-on-gcryptsetupJacob Vosmaer2015-08-111-1/+6
|/ | | | | 'gcryptsetup' is a special git-annex feature that does its own initialization.
* If git-annex is enabled set GIT_ANNEX_SHELL_LIMITED variable.git_annex_env_variableMarin Jankovski2015-07-161-1/+11
|
* Add git-lfs-authenticate to command white listArtem V. Navrotskiy2015-06-291-3/+16
|
* Refactor GitlabShell#exec a bit.Douwe Maan2015-04-061-7/+9
|
* GitlabShell doesn't need to set GL_ID at all.Douwe Maan2015-04-061-5/+4
|
* Write GitlabShell error to stderr.nice-error-messageDouwe Maan2015-04-061-18/+30
|