How to Change Your Membership Visibility in Large GitHub Organizations Using cURL
GitHub is home to many large organizations, such as Epic Games, which can have hundreds of thousands of members. If you've joined a big organization like this, you might wonder how to make your membership public so that others can see it. In this post, I’ll walk you through the steps to achieve this using GitHub's REST API and cURL commands.
There are 409.0k members in the organization but the list can only show up to 50,000 members
Why Make Your Membership Public?
Making your organization membership public can enhance your visibility within the developer community. It allows potential collaborators, employers, or followers to see your involvement in significant projects. However, GitHub's graphical interface can struggle to handle large organizations, making it challenging to change your membership visibility through the UI.
Steps to Make Your Membership Public
1. Create a Personal Access Token (PAT)
First, you’ll need to create a Personal Access Token (PAT) to authenticate your API requests. Here’s how to do it:
-
Navigate to GitHub Settings:
- Go to your GitHub account settings.
- Click on Developer settings.
- Select Personal access tokens.
-
Generate a New Token:
- Click on Generate new token.
- Select the necessary scopes, particularly the
read:org
permission. - Copy the generated token, as you will not be able to view it again later.
2. Use cURL to Change Your Membership Visibility
To make your membership public, you’ll use a cURL command. Open your terminal (Command Prompt, PowerShell, or Terminal) and run the following command:
curl -X PUT -H "Accept: application/vnd.github.v3+json" -u YOUR_GITHUB_USERNAME:YOUR_PAT_TOKEN https://api.github.com/orgs/ORGANIZATION_NAME/public_members/YOUR_GITHUB_USERNAME
Example Command:
curl -X PUT -H "Accept: application/vnd.github.v3+json" -u ThisIs-Developer:ghp_i3D************************** https://api.github.com/orgs/EpicGames/public_members/ThisIs-Developer
3. Verify Your Changes
After running the command, you won’t see any output if it was successful. To check if your membership is now public, visit your GitHub profile and look for the organization in the Organizations section.
How to Run cURL Commands
Here’s a quick guide on how to run cURL commands on different platforms:
-
For Windows:
- Open Command Prompt or PowerShell.
- Paste the cURL command and press
Enter
.
-
For macOS or Linux:
- Open Terminal.
- Paste the cURL command and press
Enter
.
⚠ Important Security Note
Your Personal Access Token is sensitive information, similar to a password. Do not share it publicly and consider revoking it if you suspect it has been compromised.
Top comments (0)