-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSH keys parameter is not optional #221
Comments
Usually if you clone with the |
@snim2 I do not want to neither clone nor push with the bot! Why would I??? There is an API method to rebase MR and there is an API method to merge MR and I want bot to use them, not doing cloning for unknown reasons |
Right, but I don't think that's how this bot works. It clones the repo, rebases against the target branch, rewrites the commit messages, pushes, then merges. So, it's going to need an SSH key. I'm not sure that you can configure |
The rebase method in the Gitlab api is a relatively recent addition (added less than an year ago), and until that point I don't think it was possible to write a merge bot that wouldn't have to clone the repo. While marge these days can optionally use the rebase api (this was added to handle merge requests from forks) there's still a lot of optional functionality that relies on having a local checkout in order to rewrite commits, etc. It may be technical possible to have a mode of operation where no cloning is necessary, but this would need a bit of work |
That was exactly my kind of suggestion - make SSH part optional and API part required. With current Gitlab state itself it's quite impossible to use the bot in controlled environments without admin access (impossible to get impersonation/sudo token and overwrite approvers), which means in fact - no point in using SSH-related part. That's exactly the point in this issue - SSH should not be mandatory, but optional.
I already did and ended my writing my own bot which was apparently quite simple :) Marge-bot is not fitting non-admin environments at all which is no-go for my team :) |
As @jcpetruzza noted, this would probably require a non-trivial amount of work since some (important) features still require SSH keys and we need to also test that the combination of SSH-key-access/lack-of -access and requested features is valid (and provide informative error messages if not). It would be nice to have that, but it's both work and adds complexity to the code base and tests, so I think it would require both someone stepping up to write a PR and at least some other users also voicing their interest in this feature. All workflows we have at smarkets require SSH keys. |
What about "Use Gitlab API" option? I do expect that you use API here and not do unexpected clones and pushes |
Hi, if bot cloned with https instead of ssh, the personal access token could be used instead and i believe it could completely replace ssh key. I am using such feature in my own (other purpose) bot, repository uri is then:
|
Just noticed, there is already issue for exactly the same thing 😄 #225 |
@JanMikes it's not "exactly the same". Linked issue about cloning. My issue is about (implicitly) using no clone at all, because why? |
I see, thank you for clarification - everything could be done via API. |
I also vote for Marge Bot to only rebase and merge using the Gitlab API without cloning. Currently, the repository is always cloned nonetheless, which not only slows down the process (as we have rather large repositories) and takes additional ressources, I would also consider this a security risk as source code is unnecessarily and unwantedly checked out and laying around in docker volumes. |
Why are SSH keys parameters required? I don't really want to do anything with it, I want to use bot purely with Gitlab API
The text was updated successfully, but these errors were encountered: