Script | Purpose |
---|---|
cloneAllRepos.sh | Clone all public repositories from a specific GitHub user |
createNewRepo.sh | Create a new repository in Github, the script will create a new repository, populate it with a standard README.md file and clone the repository to a local folder |
createSSHKey.sh | Creates a new SSH Key for use with GitHub and upload it to GitHub |
deleteRepo.sh | Deletes a repository from GitHub It does Not Prompt, so use with caution |
listAllRepos.sh | Lists all repositories for a given user |
makeRepoPublic.sh | Makes a given repository public |
setGitEnv.sh | Sets up the local GitHub environment based on the information found on the config.json file |
config.json | Stores the default configuration used by all the scripts above, this is the firs place to start |
-
Copy the config.json to your ~/.github directory. If it does not exist you can create it with:
- mkdir ~/.github
- cp <config.json_location> ~/.github
-
Edit the config file and add your information to the information on the config file:
- uname is your GitHub userID
- ufname is your full name
- umail is your email
- utoken is your GitHub token, you have to generate it in Developer Settings
- upriv is your default for repository creation, select true for creating private by default or false to create public repositories by default
After you have updated the config file you are ready to use the scripts.
- Will clone all the public user repositories
- ./cloneAllRepos.sh <gitUser>
- Will create a new, empty repository, it will create a standard README.md file and clone to local.
- ./createNewRepo.sh <RepoName>
- Will create local SSH keys and will upload the public key to GitHub
- ./createSSHKey.sh
- Will delete a given repository, no prompts, use with caution
- ./deleteRepo.sh <RepoName>
- Will list all the public repositories for a given user
- ./listAllRepos.sh <gitUser>
- Will make a given repository public
- ./makeRepoPublic.sh <RepoName>
- Will setup the basic global settings for you based on the config.json file
- ./setGitEnv.sh