This Node.js script allows you to quickly make all your private GitHub repositories public in one go. It's a handy tool for developers who want to share their work with the community effortlessly.
- Makes all private repositories public.
- Skips repositories that are already public.
- Easy setup using environment variables for security.
- Node.js installed on your machine.
- A GitHub Personal Access Token (PAT) with
repo
permissions.
-
Clone the repository:
git clone https://github.com/innocentemutabazi/Make-all-your-repos-public.git cd Make-all-your-repos-public
-
Install dependencies:
npm install dotenv
-
Create a
.env
file:In the root directory of the project, create a
.env
file and add your GitHub username and PAT:GITHUB_USERNAME=your_github_username GITHUB_TOKEN=your_personal_access_token
Replace
your_github_username
andyour_personal_access_token
with your actual GitHub username and PAT. -
Run the script:
node make_repos_public.js
The script will iterate through all your repositories and make any private ones public.
GITHUB_USERNAME
: Your GitHub username.GITHUB_TOKEN
: Your GitHub Personal Access Token withrepo
scope.
- 403 Forbidden Error: If you encounter a
403 Forbidden
error, it might be because the repository is archived. Unarchive the repository and rerun the script.
Feel free to fork this repository and submit a pull request with any improvements or additional features!
This project is licensed under the MIT License - see the LICENSE file for details.