summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Set SSL_CERT_DIR env var when building commandashmckenzie/set-ssl-cert-dir-env-varAsh McKenzie2020-10-192-46/+84
|
* Remove prefixing with SSL_CERT_DIRAsh McKenzie2020-10-194-73/+10
|
* Merge branch 'sh-release-13-10-0' into 'master'v13.10.0Igor Drozdov2020-10-162-1/+4
|\ | | | | | | | | Release v13.10.0 See merge request gitlab-org/gitlab-shell!422
| * Release v13.10.0Stan Hu2020-10-152-1/+4
|/
* Merge branch 'sh-add-version-arg' into 'master'Ash McKenzie2020-10-162-1/+18
|\ | | | | | | | | Add support for -version argument See merge request gitlab-org/gitlab-shell!421
| * Apply 1 suggestion(s) to 1 file(s)sh-add-version-argStan Hu2020-10-161-1/+1
| |
| * Add support for -version argumentStan Hu2020-10-152-1/+18
|/ | | | | This will help determine the version of the binary particularly on Cloud Native GitLab, where VERSION may not be shipped with the binaries.
* Merge branch 'release-shell-13-9-0' into 'master'v13.9.0Nick Thomas2020-10-152-1/+6
|\ | | | | | | | | Release v13.9.0 See merge request gitlab-org/gitlab-shell!420
| * Release v13.9.0Nick Thomas2020-10-152-1/+6
|/
* Merge branch 'zj-remove-testify-assert' into 'master'Nick Thomas2020-10-1512-115/+104
|\ | | | | | | | | tests: Remove testify assert in favour of require See merge request gitlab-org/gitlab-shell!419
| * Merge branch 'master' into zj-remove-testify-assertNick Thomas2020-10-150-0/+0
| |\ | |/ |/|
* | Merge branch 'zj-override-user-agent' into 'master'Nick Thomas2020-10-152-2/+43
|\ \ | | | | | | | | | | | | client: Allow User-Agent header to be overridden See merge request gitlab-org/gitlab-shell!418
| | * tests: Replace assert with requirezj-remove-testify-assertZeger-Jan van de Weg2020-10-1512-115/+104
| |/ | | | | | | | | | | | | | | | | Testify features sub packages `assert` and `require`. The difference is subtle, and lost on novice Golang developers that don't read the docs. To create a more consistent code base `assert` will no longer be used. This change was generated by a running a sed command on all `_test.go` files, followed by `goimports -w`.
| * client: Allow User-Agent header to be overriddenzj-override-user-agentZeger-Jan van de Weg2020-10-142-2/+43
|/ | | | | | | | | | The user agent for requests to the internal API endpoints used the default Go provided user agent. This change updates that to always set something else, by default `GitLab-Shell`. Than for others importing the package, there's a new API to set it to something else. This has been done with new method, a setter, to maintain backwards compatibility in the API.
* Merge branch 'sh-suppress-random-correlation-id-log' into 'master'Ash McKenzie2020-10-131-1/+0
|\ | | | | | | | | Drop "generated random correlation ID" log message See merge request gitlab-org/gitlab-shell!417
| * Drop "generated random correlation ID" log messagesh-suppress-random-correlation-id-logStan Hu2020-10-131-1/+0
|/ | | | | | This message happens all the time and doesn't add a lot of value. Relates to https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/1275
* Merge branch 'release-13.8.0' into 'master'v13.8.0Igor Drozdov2020-10-022-1/+7
|\ | | | | | | | | Release v13.8.0 See merge request gitlab-org/gitlab-shell!416
| * Release v13.8.0Stan Hu2020-10-022-1/+7
|/
* Merge branch 'sh-update-gitaly-dep' into 'master'Nick Thomas2020-10-012-32/+68
|\ | | | | | | | | Update Gitaly module dependency See merge request gitlab-org/gitlab-shell!414
| * Update Gitaly module dependencysh-update-gitaly-depStan Hu2020-10-012-32/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates Gitaly's latest Protocol Buffer definitions, which were last updated in Feburary 2020, with the latest version of Gitaly. This is done to ensure the definitions are in sync with Workhorse (https://gitlab.com/gitlab-org/gitlab-workhorse/-/merge_requests/619) and Gitaly. Because we started tagging Gitaly versions `v13.x.x` instead of `v1.x.x`, `go get` refuses to update the Gitaly module using the latest tag or SHA (https://gitlab.com/gitlab-org/gitaly/-/issues/3177). Go tries to enforce semantic compatibility by requiring the use of module paths (e.g. `m/v13`), and Gitaly doesn't adhere to this scheme. To workaround this issue, we use the replace directive (https://github.com/golang/go/wiki/Modules#when-should-i-use-the-replace-directive): ``` go mod edit -replace gitlab.com/gitlab-org/gitaly=gitlab.com/gitlab-org/gitaly@3f5e218def93024f3aafe590c22cd1b29f744105 ```
* | Merge branch 'zj-config-secret' into 'master'Nick Thomas2020-10-011-0/+4
|\ \ | |/ |/| | | | | config: Set a secret example See merge request gitlab-org/gitlab-shell!415
| * config: Set a secret exampleZeger-Jan van de Weg2020-10-011-0/+4
|/ | | | | | | The config.yml.example didn't include a field I was expecting to be there, which lead me to believe the field didn't exist. This change adds the `secret` YAML field, and describes how it interacts with the secrets_file.
* Merge branch 'sh-extract-context-from-env' into 'master'Ash McKenzie2020-09-2153-157/+304
|\ | | | | | | | | | | | | Make it possible to propagate correlation ID across processes Closes #474 See merge request gitlab-org/gitlab-shell!413
| * Make it possible to propagate correlation ID across processesStan Hu2020-09-2053-157/+304
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge branch 'zj-remove-hooks-dir' into 'master'Igor Drozdov2020-09-114-31/+0
|\ | | | | | | | | hooks: Remove deprecated hooks dir See merge request gitlab-org/gitlab-shell!411
| * hooks: Remove deprecated hooks dirzj-remove-hooks-dirZeger-Jan van de Weg2020-09-114-31/+0
|/ | | | | | | | | Over a year ago, through e0824f17367a44e5bac84dac7197f9b45e37ab01, the hooks in this repository were updated to not be successful, basically block each push from happening. This change removes the hooks, and updates the documentation. There's no customer impact, and these changes are just part of a general cleanup.
* Merge branch 'fix-security-scans' into 'master'Nick Thomas2020-09-031-26/+13
|\ | | | | | | | | Fix SAST and Dependency Scanning See merge request gitlab-org/gitlab-shell!410
| * Fix SAST and Dependency ScanningPhilippe Lafoucrière2020-09-031-26/+13
|/
* Merge branch 'id-use-docker-image-for-code-intelligence' into 'master'Patrick Bajao2020-08-281-2/+1
|\ | | | | | | | | Use docker image for Code Intelligence See merge request gitlab-org/gitlab-shell!409
| * Use docker image for Code Intelligenceid-use-docker-image-for-code-intelligenceIgor Drozdov2020-08-281-2/+1
|/
* Merge branch 'sh-release-13.7.0' into 'master'v13.7.0Igor Drozdov2020-08-212-1/+4
|\ | | | | | | | | Release v13.7.0 See merge request gitlab-org/gitlab-shell!408
| * Release v13.7.0Stan Hu2020-08-212-1/+4
|/
* Merge branch 'sh-fix-unix-relative-url-access' into 'master'Igor Drozdov2020-08-216-70/+105
|\ | | | | | | | | Fix gitlab-shell not handling relative URLs over UNIX sockets See merge request gitlab-org/gitlab-shell!406
| * Fix gitlab-shell not handling relative URLs over UNIX socketssh-fix-unix-relative-url-accessStan Hu2020-08-206-70/+105
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/4498#note_397401883, if you specify a relative path such as: ``` external_url 'http://gitlab.example.com/gitlab' ``` gitlab-shell doesn't have a way to pass the `/gitlab` to the host. For example, let's say we have: ``` gitlab_url: "http+unix://%2Fvar%2Fopt%2Fgitlab%2Fgitlab-workhorse%2Fsocket" ``` If we have `/gitlab` as the relative path, how do we specify what is the UNIX socket path and what is the relative path? If we specify: ``` gitlab_url: "http+unix:///var/opt/gitlab/gitlab-workhorse.socket/gitlab ``` This is ambiguous. Is the socket in `/var/opt/gitlab/gitlab-workhorse.socket/gitlab` or in `/var/opt/gitlab/gitlab-workhorse.socket`? To fix this, this merge request adds an optional `gitlab_relative_url_root` config parameter: ``` gitlab_url: "http+unix://%2Fvar%2Fopt%2Fgitlab%2Fgitlab-workhorse%2Fsocket" gitlab_relative_url_root: /gitlab ``` This is only used with UNIX domain sockets to disambiguate the socket and base URL path. If `gitlab_url` uses `http://` or `https://`, then `gitlab_relative_url_root` is ignored. Relates to https://gitlab.com/gitlab-org/gitlab-shell/-/issues/476
* Merge branch 'pb-release-13-6-0' into 'master'v13.6.0Igor Drozdov2020-08-182-1/+4
|\ | | | | | | | | Release v13.6.0 See merge request gitlab-org/gitlab-shell!407
| * Release v13.6.0pb-release-13-6-0Patrick Bajao2020-08-182-1/+4
|/
* Merge branch 'master' into 'master'Patrick Bajao2020-08-189-6/+679
|\ | | | | | | | | Add support obtaining personal access tokens via SSH See merge request gitlab-org/gitlab-shell!397
| * Add support obtaining personal access tokens via SSHTaylan Develioglu2020-08-179-6/+679
|/ | | | | | | | | | | | | | | | | | | | | | | | 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 ```
* Merge branch 'patch-2' into 'master'Nick Thomas2020-08-111-1/+1
|\ | | | | | | | | Specify more recent go version in go.mod See merge request gitlab-org/gitlab-shell!405
| * Specify more recent go version in go.modLukas 'Eipi' Eipert2020-08-111-1/+1
|/
* Merge branch 'sh-release-13.5.0' into 'master'v13.5.0Igor Drozdov2020-08-052-1/+4
|\ | | | | | | | | Release v13.5.0 See merge request gitlab-org/gitlab-shell!404
| * Release v13.5.0Stan Hu2020-08-052-1/+4
|/
* Merge branch 'sh-inject-and-log-correlation-di' into 'master'Igor Drozdov2020-07-319-30/+67
|\ | | | | | | | | Generate and log correlation IDs See merge request gitlab-org/gitlab-shell!400
| * Generate and log correlation IDsStan Hu2020-07-319-30/+67
|/ | | | | This will make it easier to tie an SSH access request to Rails API and Gitaly requests.
* Merge branch 'revert-869aeb90' into 'master'Igor Drozdov2020-07-231-0/+22
|\ | | | | | | | | Revert "Update executable.go" See merge request gitlab-org/gitlab-shell!403
| * Revert "Update executable.go"Igor Drozdov2020-07-231-0/+22
|/ | | This reverts commit 869aeb9057962b089abfd8ce0b6d4a0962bbb154
* Update executable.goIgor Drozdov2020-07-231-22/+0
|
* Merge branch 'sh-release-13-4-0' into 'master'v13.4.0Igor Drozdov2020-07-232-1/+7
|\ | | | | | | | | Release v13.4.0 See merge request gitlab-org/gitlab-shell!402
| * Release v13.4.0Stan Hu2020-07-232-1/+7
|/
* Merge branch 'sh-log-ssh-key-details' into 'master'Igor Drozdov2020-07-236-2/+14
|\ | | | | | | | | Log SSH key details See merge request gitlab-org/gitlab-shell!398