| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
See the discussion on gitlab-org/gitlab-shell!166
|
| |
|
|
|
|
|
|
|
|
|
|
| |
push_opts[] is named as such so that it becomes an array in the
GitLab internal Grape::API params hash. If it were named push_opts, only
the final (scalar) push_opts parameter would be present.
Also update specs to include push_opts parameter:
- gitlab_post_receive_spec
- gitlab_net_spec for the internal API change
|
|
|
| |
This reverts merge request !257
|
| |
|
|
|
|
|
|
|
|
|
| |
HttpHelper depended on exceptions defined in GitLabNet, but GitLabNet
included HttpHelper. Specs in Ruby 2.5 were breaking as a result of
Action::Custom not able to reference constants in GitLabNet:
https://gitlab.com/gitlab-org/gitlab-shell/-/jobs/126362702.
Closes https://gitlab.com/gitlab-org/gitlab-shell/issues/169
|
|
|
|
| |
Operation is either upload or download
|
| |
|
| |
|
|
|
|
| |
for handled HTTP status codes
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* Previously, a 200 (OK) was sent when the user was unauthorised or the project was not found (or the user didn't have access)
* We still treat 401 and 404 as 'success' but we need to explicitly handle them
|
|
|
|
|
|
|
|
|
| |
After the cleanup in https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/231
gitlab-shell mishandled the non 200 response codes. This commit removes
another few lines of codes, which fixes this. Also now we test against
this case through mocking.
Fixes https://gitlab.com/gitlab-org/gitlab-shell/issues/152
|
|
|
|
| |
This reverts commit 764f6f47fa6a8698ae033532ae49875a87030518.
|
|
|
|
|
| |
This reverts commit 3aaf4751e09262c53544a1987f59b1308af9b6c1, reversing
changes made to c6577e0d75f51b017f2f332838b97c3ca5b497c0.
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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".
|
| |
| |
| |
| |
| |
| | |
* Use gl_id when we don't know if it's a key-X or user-X
* Use Actor.new_from(gl_id) which will figure out if it's a Key or User
* Use key_str when we're referring to key-X as key_id is confusing
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Move gitaly, git-lfs and 2FA logic out from gitlab_shell.rb
* Streamline parsing of origin_cmd in GitlabShell
* Utilise proper HTTP status codes sent from the API
* Also support 200 OK with status of true/false (ideally get rid of this)
* Use HTTP status constants
* Use attr_reader definitions (var over @var)
* Rspec deprecation fixes
|
| |
| |
| |
| |
| | |
* Remove HTTP related requires
* Make protocol = GL_PROTOCOL the default
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
|
|
|
| |
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
'86-follow-up-from-use-gl_repository-if-present-when-enqueing-sidekiq-postreceive-jobs' into 'master'"
This reverts commit fa6343515ba65423e9de4c98c6005facc6059938, reversing
changes made to 62af7f6af72728cecb98c5275d8b7aeb3953e564.
|
|\
| |
| |
| | |
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
| | |
|
|/
|
|
|
|
|
| |
In the main Rails app we use exactly the same code for
/api/v3/internal and /api/v4/internal
This means that we can move gitlab-shell to V4 in preparation
for sunsetting V3
|
| |
|
| |
|