Code Monkey home page Code Monkey logo

tokenclone's Introduction

tokenclone

Octocatopher

A small Golang utility to clone a GitHub repository using Github app credentials.

Where is this helpful?

You can use this in a bunch of ways. One example of a use for this is Ansible Tower which currently is limited to using PATs for its Github integration. PATs and things like service account users both overscope access as well as allow long aged tokens, by using this utility you can avoid that.

Requirements

You need to have a Github App built and deployed to the repos you want to clone. Do that first.

Build

  • Clone repo
  • Build the binary
    • Defaults to an osx build
    • OS X build option make compile-osx
    • Linux arm build option make compile-linux
    • Windows build option make compile-windows
  • Your binary to run is in bin/

Usage

Warning: Your App ID is semi-sensitive information and your key (.pem file) is private and is definately sensitive. If you build this into a workflow, be sure to pickup these details in a secure manner.

Linux/OS X:
./tokenclone --app_id <id> --pem_path <path to your pem> --repo_url <git repo, https clone link>, and --clone_dir <directory to clone to>

Windows:
tokenclone.exe --app_id <id> --pem_path <path to your pem> --repo_url <git repo, https clone link>, and --clone_dir <directory to clone to>

Help

./tokenclone --help

tokenclone's People

Contributors

nwaringa avatar

Watchers

 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.