mend / renovate-ce-ee

Mend Renovate Documentation & Examples
https://www.mend.io/renovate/
Other
160 stars 57 forks source link

encryption with self-hosted Gitlab - organization field #537

Closed owngr closed 1 month ago

owngr commented 1 month ago

Hello,

Basically, we're using a self-hosted Gitlab and self-hosted Renovate CE. We have a copy of the encryption website with our own private key.

The organization doesn't exist by default on self-hosted Gitlab, and I fail to understand what I should enter for this required field, should it be replaced by Gitlab groups ?

I followed this documentation, but there's no explaination on the usage on different platforms

For example, let's say that I have this repo:

foobar.gitlab.com/groupA/groupB/frontend

Should the organization be groupA and the repository groupB/frontend ?

PhilipAbed commented 1 month ago

i believe in your case frontend should be the repo, and the whole foobar.gitlab.com/groupA/groupB should be the org you can check it out by seeing logs in debug mode

This is the code that checks,

https://github.com/renovatebot/renovate/blob/e2a7586466df0370ac71659332b5fb459a483d4b/lib/config/decrypt.ts#L53-L124

the values are

const { o: org, r: repo, v: value } = decryptedObj.data;

if you have it wrong it should print this:

logger.debug(
        { scopedRepos },
       'Secret is scoped to a different repository',
      );

or

logger.debug(
              { orgPrefixes },
              'Secret is scoped to a different org',
            );
owngr commented 1 month ago

Thanks a lot for your explanation, I didn't know about the warning