Hi, I have created my account in Terraform registry using my Github User.
My Github user is also the owner of a Github Organization. I’m trying to publish a module from a repository owned by my Github organization. When I try to publish the module only repositories owned by my user are listed, no repositories from my Organization =( .
This worked for me. Go to the organizations settings in GitHub. About half way down the settings select “Third Party Access” and then enable third party access.
It is definitely possible to publish from an organization rather than a personal account. For example, here are two modules that are published from repositories that belong to organizations on GitHub:
However, the problem of the organizations being unlisted in the registry UI is familiar to me. It’s been a long while so I don’t remember the details, but I believe @wderezin’s idea is in the right direction: the Terraform Registry asks the GitHub API which organizations your account belongs to, but GitHub filters that answer based on whether your membership in each organization is “visible”.
I don’t work on the Terraform Registry so I’m not able to answer with certainty, but I peeped in the Terraform Registry source code (which I can see because I’m a HashiCorp employee, but I normally work on Terraform Core) and see that it’s using List repositories for the Authenticated User, which returns (per the docs):
repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership
The docs don’t mention anything about organization membership visibility, but I do remember that I needed to do something special to make my organization visibility public before the registry could use this API endpoint to discover the repositories in that organization.
That “Third Party Access” setting that @wderezin mentioned seems promising, but I can’t confirm whether that’s the trick because I don’t have any additional organizations associated with my GitHub account to test with.
Thanks @acauret !
In case anyone is wondering how to find this page, I found it from my personal settings page’s organizations settings which led me to a url like this: https://github.com/ORG/REPO/settings/access