Giter Club home page Giter Club logo

gitpod's Introduction

SSH and GPG with gitpod

Get Your .gitconfig

  1. Your Git Config is located at ~/.gitconfig
  2. Encode the File with base64:
cat .gitconfig | base64 -w 0
  1. Create a variable on gitpod.

    • Enter Name GITCONFIG.
    • Enter output of previous command as Value.
  2. Add following task to your .gitpod.yml:

tasks:
  - before: >
      [[ ! -z $GITCONFIG  ]] &&
      echo $GITCONFIG | base64 -d > ~/.gitconfig &&
      chmod 644 ~/.gitconfig

Make commits GPG-signed

  1. To sign commit using GPG you must first add GPG keys to Github and/or Gitlab.

  2. Your GPG Keys are stored in ~/.gnupg folder. Encode this folder with base64.

tar -czf - ~/.gnupg | base64 -w 0
  1. Create a variable on gitpod.
    • Enter Name GNUPG.
    • Enter output of previous command in Value.
  2. Add following task to your .gitpod.yml:
tasks:
  - before: >
      [[ ! -z $GNUPG  ]] &&
      cd ~ &&
      rm -rf .gnupg &&
      echo $GNUPG | base64 -d | tar --no-same-owner -xzf -

SSH Github and Gitlab from gitpod

  1. Add SSH Keys to Github and/or Gitlab

  2. Get your SSH Public Key from id_rsa.pub

    • Create a variable on gitpod.
    • Enter Name SSH_PUBLIC_KEY.
    • Paste the contents of file in Value.
  3. Get your SSH Public Key from id_rsa

    • Create a variable on gitpod.
    • Enter Name SSH_PRIVATE_KEY.
    • Encode the File id_rsa with base64.
    cat id_rsa | base64 -w 0
    • Paste the output of previous command in Value.
  4. Add Following tasks to your .gitpod.yml:

tasks:
  - before: >
      mkdir -p ~/.ssh &&
      [[ ! -z $SSH_PUBLIC_KEY  ]] &&
      echo $SSH_PUBLIC_KEY > ~/.ssh/id_rsa.pub &&
      chmod 644 ~/.ssh/id_rsa.pub &&
      [[ ! -z $SSH_PRIVATE_KEY  ]] &&
      echo $SSH_PRIVATE_KEY | base64 -d > ~/.ssh/id_rsa &&
      chmod 600 ~/.ssh/id_rsa

gitpod's People

Contributors

dtan13 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.