gitfetcher

command module
v0.4.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 4 Imported by: 0

README

Git fetcher codecov

[!NOTE] WIP: this tool is usable but its API may change in breaking ways.

A lightweight CLI to create local copies of remote repositories.

Highlights:

  • Simple file-based configuration
  • gitweb-compatible local repositories
  • Automation-friendly, including secret handling

Quickstart

go install github.com/mtth/gitfetcher

Sample .gitfetcher configuration (txtpb format):

github {
  # Sync any public repository by name.
  sources { name: "golang/go" }
  sources { name: "nodejs/node" }

  # Sync repositories available to a given authentication token. This is useful
  # for example to sync all your personal repos.
  sources {
    auth {
      # A token with read access to repositories is required. It can either be
      # specified inline or via an environment variable (prefixing it with `$`).
      token: "$GITHUB_TOKEN"

      # Forks are excluded by default and can be included using via this option.
      # include_forks: true

      # It's also possible to filter by repository name by specifying one or
      # more filters, optionally including wildcards. A repository will be
      # synced if it matches at least one.
      # filters: "user/*"
      # filters: "user/prefix*"
    }
  }

  # More sources...
}

# Path to root folder where local repositories will be stored, relative to the
# configuration file. Defaults to the configuration's enclosing directory.
# root: "/path/to/.gitfetcher"

Then run gitfetcher sync in the folder containing the above configuration. See gitfetcher --help for the full list of available commands and options.

Documentation

Overview

Package main implements the gitfetcher CLI.

Directories

Path Synopsis
Package gitfetcher creates local mirrors from remote git repositories.
Package gitfetcher creates local mirrors from remote git repositories.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL