Skip to content

A simple utility program for privatizing GitHub repositories

License

Notifications You must be signed in to change notification settings

rharri/privatize-repo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Privatize GitHub Repositories

I needed to privatize several repositories and thought it would be more fun to write a program instead of using GitHub's UI.

About

A simple utility that iterates through a user's public (un-forked) repositories and sets each one to private. If the user specifies repositories in the exclude.txt file, those repositories are not set to "private".

It bears mentioning that this action has consequences and should be taken with careful consideration. Use of this Software is at your own risk.

This program is written in Java, however this could also have been accomplished with curl, Python, or your favourite programming language. This program illustrates working with single-file source code programs with Java (introduced with Java SE 11).

Requirements

  • Java SE 21*
  • FasterXML Jackson library >= 2.18.0-rc1 (included in lib directory)
  • GitHub Account and Token

*May work with Java SE 11+, however this has not been tested

Example Usage

Do a dry run

% java -cp "lib/*" Main.java <username> <token> --dry-run

Run the program against the real repositories

% java -cp "lib/*" Main.java <username> <token>

GitHub Personal Access Token

Be careful with your GitHub Personal Access Token; treat it as a password!

About

A simple utility program for privatizing GitHub repositories

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages