GitHub Repo Clone: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Loops through all of the public and private repositories for a user, and clones them to the local system == Requirements == * Ruby installed - https://www.ruby-lang.org/en/do...") |
|||
Line 22: | Line 22: | ||
== Download / Source Code == | == Download / Source Code == | ||
*https://github.com/ | * https://github.com/levidsmith/clone_github_repos |
Latest revision as of 20:53, 12 June 2020
Loops through all of the public and private repositories for a user, and clones them to the local system
Requirements
- Ruby installed - https://www.ruby-lang.org/en/downloads/
- json gem installed - gem install json
- git installed - https://git-scm.com/
- GitHub Personal Access token
- https://github.com/settings/tokens
- Select Personal access tokens
- Press Generate new token
- Authenticate with GitHub password
- Select repo for scope
- Press Generate token
Setup
- Copy Personal access token value (should be a hexadecimal string), and paste it for the value of API_TOKEN
- Set CLONE_DIR to the directory where the cloned projects should exist (double backslash may be required on Windows)
Running
- Start Git bash
- ruby clone_git_repos.rb