Giter Site home page Giter Site logo

nberlette / gitpod-enhanced Goto Github PK

View Code? Open in Web Editor NEW
11.0 2.0 3.0 1.27 MB

Turbocharge your Gitpod Workspaces with my custom built version of gitpod/workspace-full.

Home Page: https://gitpod.tk

License: MIT License

Dockerfile 100.00%
gitpod gitpod-workspace git-prompt gitpod-enhanced dockerfile docker ide bash vscode dotfiles

gitpod-enhanced's Introduction

Open in Gitpod: Ready to Code GNU Bash: Bourne Again Shell PNPM: Performant Node Package Management PNPM: Performant Node Package Management

Turbocharged Gitpod.io workspace image (built on-top of the official gitpod/workspace-full) with some tasteful enhancements to improve developer experience.


Getting Started

# add to .gitpod.yml

image: nberlette/gitpod-enhanced

Features

Git Enhancements

Package Management

Other terminal addons

  • Installs sensible defaults for ls, diff, grep - all with color
  • Bundled with many useful aliases, tools, and various other functional upgrades
  • Removes duplicate entries from $PATH variable

Configuration

For more details on builtin workspace features, see the Gitpod documentation.

GitHub CLI Authentication

I'm currently working (on minimal bandwidth) to integrate the newly-released dotfiles support with gitpod-enhanced, which will allow for a lot more streamlined configuration for settings such as this.

Until then, however, we have only the finest of janky solutions!

GITHUB_TOKEN="ghp_2ed23idj023ijmdjqkfewjdsnfe"

# set with gitpod's CLI:
eval $(gp env -e GITHUB_TOKEN=$GITHUB_TOKEN)

Setting the $GITHUB_TOKEN variable with a properly-scoped PAT (personal access token), will direct gitpod-enhanced to automatically authenticate your account with the GitHub CLI.

This means you'll be able to use the full list of features as soon as you fire up your workspaces!


GPG Support

I've recently included (experimental) support for GPG commit signatures, via the command line or Visual Studio Code UI.

If you create a new PGP key within a Gitpod workspace using the GitHub CLI (gh), it's pretty straightforward:

# find <key-id> using gpg (or in output of `gh keys`)
gpg --list-secret-keys --keyid-format LONG

# save as $GPG_KEY_ID
GPG_KEY_ID="<key-id>"

# export to gitpod
gp env GPG_KEY=$(gpg --export-secret-keys $GPG_KEY_ID | base64 -w 0)

# saves key-id; exports all gp vars to current workspace
eval $(gp env -e GPG_KEY_ID=$GPG_KEY_ID)

# source our .bashrc file for changes to take effect
source ~/.bashrc

Formatting PS1 and GIT_PS1

The GIT_PS1_ environment variables control the functions and display of the git-integrated shell prompt.

These are the currently available options and their default:

GIT_PS1_SHOWCOLORHINTS="1"
GIT_PS1_SHOWDIRTYSTATE="1"
GIT_PS1_SHOWSTASHSTATE=""
GIT_PS1_SHOWUNTRACKEDFILES=""
GIT_PS1_SHOWUPSTREAM="auto"
GIT_PS1_OMITSPARSESTATE="1"
GIT_PS1_STATESEPARATOR=""
GIT_PS1_DESCRIBE_STYLE="tag"
GIT_PS1_HIDE_IF_PWD_IGNORED="1"

The last three options are GIT_PS1_PREFIX, GIT_PS1_SUFFIX, GIT_PS1_FORMAT. These allow you to change the colors and format of the surrounding PS1 prompt string.

GIT_PS1_PREFIX="\[\e]0;\u \W\e\]\[\e[1;7;33m\] \u \[\e[0;7;36m\] \w \[\e[0;1m\] git:("
GIT_PS1_SUFFIX="\[\e[1m\])\[\e[0m\]\n\[\e[1;32;6m\]\$\[\e[0m\] "
GIT_PS1_FORMAT="%s"

They have no git config equivalent, and must be set in settings.json, the Gitpod Dashboard, or through the command gp env in the terminal:

eval $(gp env -e GIT_PS1_PREFIX="\[\e[1m\] \w \[\e[0m\] ... ")

You may change/remove any of these (with scope!) in Dashboard > Settings > Variables.

Override via .vscode/settings.json

// .vscode/settings.json
{
  "terminal.integrated.env.linux": {
    "GIT_PS1_SHOWUPSTREAM": "auto verbose name",
    "GIT_PS1_SHOWUNTRACKEDFILES": ""
  }
}

Override via .gitpod.yml

# .gitpod.yml
gitConfig:
  bash.showUpstream: "false"
  bash.hideIfPwdIgnored: "false"

Note: only some of the variables have an equivalent git config value, which allows you to override them on a per-repository level, right from the .gitpod.yml configuration file.


Contributing

Community contributions are paramount to the success of Open Source projects such as this, and maintainers like me rely on people like you to help keep the code alive. You are more than welcome to make any contributions, and I highly encourage you to make a pull request - regardless of whether you're adding, editing, or deleting code. It's all welcome here.


Code of Conduct

Please read the guidelines for contributing, as well as our community code of conduct before you make any contributions. Once you feel familiar with them, if you have any questions just open an issue or contact me.


License

MIT © 2022 Nicholas Berlette • all rights reserved

gitpod-enhanced's People

Contributors

nberlette avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

brycensranch

gitpod-enhanced's Issues

[HELP] stop committing on my repo

Describe the bug
every time I commit it shows ur face instead of mine

To Reproduce
git commit -m "chore(repo): commit signing step"

Expected behavior
to see my face when committing

Screenshots

DIS YOU?

image

Gitpod IDE (please complete the following information):

  • VSCode Desktop
  • Unknown
  • GamingLaptop
  • Windows, sshed into GitPod that is running Linux

Additional context
I set my own gpg signing key and uploaded to github yet I still see your face!! >:(

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.