Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/basemax/github-cloner
GitHub Cloner is a Ruby script to automate cloning all repositories from your GitHub account. It supports both public and private repositories, with a configurable clone path.
https://github.com/basemax/github-cloner
clone git git-clone git-cloner git-lfs github github-api github-clone github-clone-api
Last synced: 2 days ago
JSON representation
GitHub Cloner is a Ruby script to automate cloning all repositories from your GitHub account. It supports both public and private repositories, with a configurable clone path.
- Host: GitHub
- URL: https://github.com/basemax/github-cloner
- Owner: BaseMax
- License: mit
- Created: 2025-01-10T22:59:48.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2025-01-11T04:30:09.000Z (about 1 month ago)
- Last Synced: 2025-02-07T10:17:22.921Z (4 days ago)
- Topics: clone, git, git-clone, git-cloner, git-lfs, github, github-api, github-clone, github-clone-api
- Language: Ruby
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Cloner
**GitHub Cloner** is a Ruby script to automate cloning all repositories from your GitHub account. It supports both public and private repositories, with a configurable clone path.
## Features
- Fetches all repositories (public and private) from your GitHub account.
- Clones repositories into a specified directory.
- Uses `.env` file for storing sensitive information like GitHub tokens.## Requirements
- Ruby (>= 2.5)
- Git
- `dotenv` gem for managing environment variables## Installation
1. Clone this repository:
```bash
git clone https://github.com/BaseMax/github-cloner.git
cd github-cloner
```2. Install the required gem:
```bash
gem install dotenv
```3. Copy the `.env.example` file to `.env`:
```bash
cp .env.example .env
```4. Edit the `.env` file to include your GitHub personal access token and desired clone path:
```
GITHUB_TOKEN=your-personal-access-token
CLONE_PATH=./../
```Replace your-personal-access-token with your GitHub token.
Set `CLONE_PATH` to your desired directory for cloning (default is `./`).
Note: To generate a personal access token, visit GitHub Token Settings.
## Using
```bash
ruby github_cloner.rb
```The script will:
- Fetch all your repositories from GitHub.
- Clone them into the directory specified by `CLONE_PATH`.### Example Output
```
Fetching repositories...
Cloning repo1 into ./../...
Cloning repo2 into ./../...
All repositories cloned successfully!
```### License
This project is licensed under the MIT License.
Copyright 2025, Max Base