Skip to content
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

WUD 8.0.0 - Registries issues in documentation: GITLAB / FORGEJO #567

Open
alexdelprete opened this issue Jan 15, 2025 · 2 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@alexdelprete
Copy link

Regarding GITLAB, in docs I read this:

image

Previously I used only the token entry, and it worked, as per example shown above.
In latest WUD, in order to make it work, I had to add all 3 entries, and I also added the {REGISTRY_NAME} (I used PUBLIC), which is not present in documentation:

      - WUD_REGISTRY_GITLAB_PUBLIC_URL=https://registry.gitlab.com
      - WUD_REGISTRY_GITLAB_PUBLIC_AUTHURL=https://gitlab.com
      - WUD_REGISTRY_GITLAB_PUBLIC_TOKEN=zzzzzhghdhdshwsjdkwkiow

Regarding FORGEJO, docs say:

image

But it wouldn't work. I then tried to use a personal token to access the API, and it worked. So docs should be amended with WUD_REGISTRY_FORGEJO_{REGISTRY_NAME}TOKEN vs WUD_REGISTRY_FORGEJO{REGISTRY_NAME}_PASSWORD.

Thanks for the great release.

@alexdelprete alexdelprete changed the title Registries issues in documentation: GITLAB / FORGEJO WUD 8.0.0 - Registries issues in documentation: GITLAB / FORGEJO Jan 15, 2025
@fmartinou fmartinou self-assigned this Jan 16, 2025
@fmartinou fmartinou added the bug Something isn't working label Jan 16, 2025
@fmartinou
Copy link
Collaborator

Hi,


Regarding Gitlab, I fixed the doc 👍

Env var Required Description Supported values Default value when missing
WUD_REGISTRY_GITLAB_{REGISTRY_NAME}_AUTHURL 🔴 Gitlab Authentication base url https://gitlab.com
WUD_REGISTRY_GITLAB_{REGISTRY_NAME}_TOKEN 🔴 Gitlab Personal Access Token
WUD_REGISTRY_GITLAB_{REGISTRY_NAME}_URL 🔴 Gitlab Registry base url https://registry.gitlab.com

Regarding Forgejo, the configuration is inherited from the Gitea configuration and for both the supported implemented conf is

        return this.joi.object().keys({
            url: this.joi.string().uri().required(),
            login: this.joi.alternatives().conditional('password', {
                not: undefined,
                then: this.joi.string().required(),
                otherwise: this.joi.any().forbidden(),
            }),
            password: this.joi.alternatives().conditional('login', {
                not: undefined,
                then: this.joi.string().required(),
                otherwise: this.joi.any().forbidden(),
            }),
            auth: this.joi.alternatives().conditional('login', {
                not: undefined,
                then: this.joi.any().forbidden(),
                otherwise: this.joi
                    .alternatives()
                    .try(
                        this.joi.string().base64(),
                        this.joi.string().valid(''),
                    ),
            }),
        });

So WUD_REGISTRY_FORGEJO_{REGISTRY_NAME}_TOKEN is currently not implemented 🤔 .

Can you, please, paste an example of the conf which is working for you?

@alexdelprete
Copy link
Author

alexdelprete commented Jan 16, 2025

So WUD_REGISTRY_FORGEJO_{REGISTRY_NAME}_TOKEN is currently not implemented 🤔 .

Can you, please, paste an example of the conf which is working for you?

Basically, the account password doesn't work, I had to put the token in the password field:

      - WUD_REGISTRY_FORGEJO_CODEBERG_URL=https://codeberg.org
      - WUD_REGISTRY_FORGEJO_CODEBERG_LOGIN=myaccount
      - WUD_REGISTRY_FORGEJO_CODEBERG_PASSWORD=ykjewofnhwjefnMYTOKENwigfwnogjfwngwgn

Since this works, I guess it's better to rename the WUD_REGISTRY_FORGEJO_CODEBERG_PASSWORD variable WUD_REGISTRY_FORGEJO_CODEBERG_TOKEN.

I didn't read the Forgejo API docs, are you sure the API works with user/pw and not with user/token? For me it worked when using the PAT and not the password.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants