Skip to content

hakadoriya/git-goprivate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

git-goprivate is a git subcommand for configuring .git/config to work with the GOPRIVATE environment variable.

Installation

curl -sSfL https://raw.githubusercontent.com/hakadoriya/git-goprivate/main/git-goprivate -o ./git-goprivate && chmod +x ./git-goprivate

To use git-goprivate as a git subcommand, move it to a directory in your PATH:

# Example: Move to a directory in PATH
mv ./git-goprivate /usr/local/bin/git-goprivate

# Now you can use it as a git subcommand
git goprivate

Features

add

Configures .git/config for use with the GOPRIVATE environment variable.

$ GITHUB_TOKEN=$(gh auth token) GOPRIVATE=github.com/hakadoriya git-goprivate add

$ tail -n 2 .git/config
[url "https://gho_GITHUBACCESSTOKEN:[email protected]/hakadoriya"]
        insteadOf = https://github.com/hakadoriya

Usage

$ git-goprivate
git-goprivate - a git subcommand for configuring .git/config to work with the GOPRIVATE environment variable.

Usage:
  git-goprivate <SUBCOMMAND>

SUBCOMMAND:
    add
        Configure .git/config for use with the GOPRIVATE environment variable.
        Usage:
          git-goprivate add [--global|--local]
    help, usage
        Show this help message.
        Usage:
          git-goprivate help

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages