Giter Club home page Giter Club logo

ogit's Introduction

ogit

TUI and CLI for organizing git repositories across multiple providers (e.g. GitHub, GitLab).

Install

Install via go-install

go install -ldflags="-X main.version=installed-with-go-install" github.com/wmalik/ogit/cmd/ogit@latest

Install via source code

go build -ldflags="-X main.version=local-build" -o ogit cmd/ogit/main.go

Install via GitHub Releases

Download a pre-built binary for your platform here

Configuration

Add [ogit] sections to ~/.gitconfig.

Config for GitHub repositories (using ssh-agent)
[ogit]
  storagePath = /absolute/path/on/disk
  fetchUserRepos = false
  sshAuth = ssh-agent
[ogit "github"]
  orgs = tpope, charmbracelet
Config for GitHub and GitLab repositories (using ssh-agent)
[ogit]
  storagePath = /absolute/path/on/disk
  fetchUserRepos = false
  sshAuth = ssh-agent
[ogit "github"]
  orgs = tpope, charmbracelet
[ogit "gitlab"]
  orgs = fdroid
Config for user's repositories only (using ssh-agent)
[ogit]
  storagePath = /absolute/path/on/disk
  fetchUserRepos = true
  sshAuth = ssh-agent
Config for GitHub and GitLab repositories (using private SSH key)
[ogit]
  storagePath = /absolute/path/on/disk
  fetchUserRepos = false
  sshAuth = /absolute/path/to/privatekey
[ogit "github"]
  orgs = tpope
[ogit "gitlab"]
  orgs = fdroid

Authentication

SSH Auth

The sshAuth attribute in ~/.gitconfig is used to perform the "git clone" operation for both Github and GitLab repositories. An SSH key pair must be available on the host machine and associated with the GitHub and GitLab accounts. The SSH key pair can be fetched from either an ssh-agent or from a file on disk. If the private key is protected with a passphrase, the only way to use it is through ssh-agent.

GitHub/GitLab API Auth

Personal access tokens for GitHub/GitLab must be configured via the following environment variables:

  • GITHUB_TOKEN (with repo scope)
  • GITLAB_TOKEN (with read_api scope)

The tokens can be generated here and here.

Usage

Setup credentials

ssh-add ~/.ssh/your_private_key
export GITHUB_TOKEN="yourpersonalaccesstoken_with_full_repo_access"
export GITLAB_TOKEN="yourtoken_with_read_api_scope"

Fetch repository metadata and launch TUI

ogit fetch && ogit

Clone all repositories belonging to an org

ogit clone --org tpope

Clone some repositories belonging to an org

ogit clone --org tpope --filter vim

Open repository specific urls in your web browser

cd /your_ogit_storage_path/github/charmbracelet/bubbletea
ogit pulls
ogit web
ogit org
ogit issues
ogit actions
ogit releases
ogit settings

ogit's People

Contributors

padawin avatar wmalik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.