Skip to content

[Bug?]: Unrecognized or legacy configuration settings found: approvedGitRepositories #7108

Closed

Description

@dimaslanjaka

Self-service

  • I'd be willing to implement a fix

Describe the bug

approvedGitRepositories caused to crash with github ci actions/setup-node@v6 with Yarn v4.14.1, read linked issue actions/setup-node#1534
In local nothing error, but only on github CI.
currently i downgrade yarn to v4.5.0 to work for both local and ci

To reproduce

try run https://github.com/dimaslanjaka/static-blog-generator-hexo/blob/3e4631dc501b9dc8e881919d75ed127df65aeabb/.github/workflows/build-site.yml

Environment

System:
    OS: Windows 10 10.0.19045
    CPU: (4) x64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
  Binaries:
    Node: 22.17.1 - C:\Users\Dell\AppData\Local\Temp\xfs-b20f392a\node.CMD
    Yarn: 4.14.1 - C:\Users\Dell\AppData\Local\Temp\xfs-b20f392a\yarn.CMD
    npm: 11.11.1 - C:\nvm4w\nodejs\npm.CMD

Additional context

No response

Activity

  1. itsalysialynn commented on May 7, 2026

    @itsalysialynn

    Same issue here. I run yarn set version latest and it adds this line to my config:

    approvedGitRepositories:
      - "**"
    

    But now, when I run any yarn command in my project I see this error. If I remove this line in my config it downgrades my yarn.lock version to 8 from 9 and CI fails.

  2. clemyan commented on May 9, 2026

    @clemyan
    Member

    You are mixing multiple Yarn versions under a single directory:

    https://github.com/dimaslanjaka/static-blog-generator-hexo/blob/3e4631dc501b9dc8e881919d75ed127df65aeabb/.yarnrc.yml#L33
    https://github.com/dimaslanjaka/static-blog-generator-hexo/blob/3e4631dc501b9dc8e881919d75ed127df65aeabb/site/public-source/github-actions/.yarnrc.yml#L3
    https://github.com/dimaslanjaka/static-blog-generator-hexo/blob/3e4631dc501b9dc8e881919d75ed127df65aeabb/packages/github-pages-validator/.yarnrc.yml#L3

    This is generally a bad idea. In your particular case, the v3 instance will not recognize the configuration introduced in v4.

    Also, nesting packages that are not workspaces under inside a project is not really great either. Without a lockfile to denote the root of a project, Yarn will be confused whether it should treat it as a workspace. I don't exactly know how bad it is or what would break, but it is very much not recommended. Even with a lockfile we only suggest that as a workaround for some specific issues.

    Make every package under a directory workspaces. If something needs a different version of Yarn, please move it out of the project into another directory.

  3. clemyan commented on May 9, 2026

    @clemyan
    Member

    If I remove this line in my config it downgrades my yarn.lock version to 8 from 9 and CI fails.

    This should only happen if you are running multiple versions of Yarn in the same project. Please make sure you are running a single version of Yarn in the same project everywhere

  4. dimaslanjaka commented on May 9, 2026

    @dimaslanjaka
    Author

    @clemyan those different project, this error happened on first CI job "yarn install", in local both WSL and windows no error. This happens only in CI instance

    Also yarn not looking and apply non-current dir yarn.yml config.

  5. clemyan commented on May 16, 2026

    @clemyan
    Member

    this error happened on first CI job "yarn install"

    Not true

    Because of how you configured @actions/setup-node, it will try to find all cache paths in your project to restore by running yarn config get in every directory with a package.json, including site/public-source/github-actions and packages/github-pages-validator. Running yarn config get in those two directories results in the errors you see.

    Also note that @actions/setup-node does not support running it with cache without committing your lockfile

    yarn not looking and apply non-current dir yarn.yml config

    It does

  6. yarnbot commented on Jun 15, 2026

    @yarnbot
    Collaborator

    Hi! 👋

    It seems like this issue as been marked as probably resolved, or missing important information blocking its progression. As a result, it'll be closed in a few days unless a maintainer explicitly vouches for it.

  7. dimaslanjaka commented on Jun 17, 2026

    @dimaslanjaka
    Author

    currently i removed yarnPath between monorepo workspace (.yarnrc.yml), and work. so, on yarn version 4.14 not support mixed version (strict) like previous version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleIssues that didn't get attentionwaiting for feedbackWill autoclose in a while unless more data are provided

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions