Reputation: 17515
I have created four organizations, but when a non-logged in user access my profile, he/she can see only one of them. Why?
Is there any difference between GitHub organizations? How to make other organizations public and how to make them appear in my GitHub profile.
Upvotes: 6
Views: 1786
Reputation: 33
I encountered this post while searching for a solution to a problem I was facing, which was similar to the same as described here.
The solution provided by user @trejder is indeed valid for normal conditions. However, I faced an additional challenge involving an organization that was quite large, with around 500k members. GitHub has a limit of displaying up to 50k members in the People
section of an organization. Due to this limit, my user wasn't showing up in the list as expected.
After some digging, I found a solution using the GitHub CLI (gh cli
) that worked perfectly.
To tackle this issue, I used the following command:
# GitHub CLI api
# https://cli.github.com/manual/gh_api
gh api \
--method PUT \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/orgs/ORG/public_members/USERNAME
This command allowed me to set my public organization membership using the GitHub API.
It's essential to specify the organization name (ORG
) and your GitHub username (USERNAME
) in the command.
For those interested, you can find more details in the official GitHub API documentation: Set Public Organization Membership.
I hope this helps others facing similar challenges and looking to showcase larger organizations on their public GitHub profiles.
Upvotes: 3
Reputation: 17515
As in case of GitHub accounts, all organizations are public (but may have private repositories). But, even being part of such public organization doesn't automatically mean, that your presence is public.
In fact, it isn't. By default, GitHub assumes, that you may don't want to share with others the fact, that you're part of this or that GitHub organization. And that is why, by default organization icon does not appear in your public profile.
To change this, go to organization page and click on People
in the right top box or navigate directly to:
https://github.com/orgs/[orgname]/people
Find yourself on the list of organization's members, click Private
in the fifth column and change that to Public
. Changes are reflected immediately.
Menu, that appears after clicking Private
or Public
, describes which state means what.
Upvotes: 9