Categorygithub.com/flarexes/gitback
modulepackage
0.0.0-20241105021049-e5051453986b
Repository: https://github.com/flarexes/gitback.git
Documentation: pkg.go.dev

# README

GitBack

GitBack is a tool designed to backup GitHub repositories either with or without authentication. It provides the flexibility to backup public repositories without authentication or to backup both public and private repositories using a GitHub Personal Access Token (PAT).

Dependencies

Installation

  1. Clone the GitBack repository:
git clone https://github.com/flarexes/gitback.git
  1. Navigate to the cloned directory:
cd gitback
  1. Build the project:
go build
  1. Set up a GitHub Personal Access Token (PAT) if you plan to backup private repositories. Instructions can be found here.

  2. Add your GitHub Personal Access Token as environment variable:

    GITHUB_PERSONAL_ACCESS_TOKEN=your_token_here
    
    • Windows:

      • Open Control Panel and navigate to System and Security > System > Advanced system settings > Environment Variables.
      • Under System Variables, click "New" and add a variable named GITHUB_PERSONAL_ACCESS_TOKEN with your PAT as the value.
    • Linux (e.g., Ubuntu) & MacOS:

      • Open your terminal and edit the .bashrc or .zshrc file using your preferred text editor (e.g., nano, vim, gedit):
      nano ~/.bashrc
      
      • Add the following line at the end of the file:
      export GITHUB_PERSONAL_ACCESS_TOKEN=your_token_here
      
      • Save the file and exit. Then, reload the shell configuration:
      source ~/.bashrc
      

Usage

./gitback [flags]

Flags

  • -noauth: Disable GitHub authentication. Limited to 60 requests per hour and only public data can be accessed.
  • -username: Required when --noauth flag is set. Specify the GitHub username to backup public repositories.

Examples

Backup Public Repositories (No Authentication)

./gitback -noauth -username flarexes

Backup Private and Public Repositories (With Authentication)

./gitback

Contributing

Contributions are welcome! Please feel free to submit a pull request, I want to take this project futher.

Issues

If you encounter any issues or have suggestions for improvements, please open an issue on the GitHub repository.

License

This project is licensed under the BSD-3-Clause license. For more information, please see the LICENSE file.

# Packages

No description provided by the author