Socket
Book a DemoInstallSign in
Socket

git-4-csb

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

git-4-csb

CodeSandbox basic git commands wrapper.

unpublished
latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

git-4-csb

Summary

Aims to seamlessly support basic git commands via a bash alias in CodeSandbox.

  • Master sandbox
  • Git tracker

Commands we will support

Note: To bypass the bash alias and access the real git, use \git

  • git add .

  • git commit -m "My commit message"

  • git push

  • git pull

  • git status

  • g4c install

    • To be run after install through the package.json "prestart" script. Reads the env vars and modifies the container with a stable private key and a .bashrc alias.
  • g4c keygen

    • Runs ssh-keygen and escapes the new lines for use in G4C_ED25519

Setup

First, npm i --save-dev git-4-csb. This will give you access to the g4c command.

Second, generate your ssh-keys with g4c keygen

Third, configure the CodeSandbox secret environment variables

  • G4C_EMAIL
    • eg: 12345-CrashOverride@users.noreply.gitlab.com
  • G4C_REMOTE
  • G4C_ED25519
    • Your private key, with new lines replaced by $ signs
  • G4C_RSA (alternatively)
    • same thing, but for RSA

Finally, add "predev": "npx g4c i || :" under your package.json scripts. Replace prestart with predevelop, preserve or prestart if you do not have a "dev" script.

"install" scripts won't work as we need access to the secrets which are not available at install time, only at final runtime.

Keywords

codesandbox

FAQs

Package last updated on 31 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts