smarkets / marge-bot

A merge-bot for GitLab
BSD 3-Clause "New" or "Revised" License
693 stars 136 forks source link

Document group access tokens #358

Open gforcada opened 1 year ago

gforcada commented 1 year ago

On the README it is stated that one needs a user with a specific gitlab user to get both an access token and an SSH key pair to set marge-bot.

Although that is still valid, I guess, I'm installing it myself, and our our gitlab.com group and I found that with only a Group Access Tokens is enough to get it run 🤖 🚀

Specially if you are using gitlab.com and paying per accounts, this allows you to save a billed account.

SSH keys are also not needed, I guess due to GitLab offering the rebase api 🤔

I will see if I have some time to create a MR for it.

Is there any advise on NOT to use this feature?

Mistic92 commented 1 year ago

Would be great to have this documented. We are too on paid plan so using group access token would be better for us :)

gforcada commented 1 year ago

We are actually using it. The trick here is to use an ssh key pair from an existing user, but using a Group Access Token, that effectively creates a user, though you can not configure that user 😄

I was expecting that if you specify a rebase-remotely it would not even need SSH, but seems not 😕

Our current marge-bot configuration is:

auth-token: XXXX
gitlab-url: 'https://gitlab.com'
ci-timeout: 30min
rebase-remotely: true
# this file does not exist, but as the server already has SSH keys
# it works
ssh-key-file: ../marge.config