Git-secret: Installing via npm / yarn

Created on 22 Jan 2020  路  9Comments  路  Source: sobolevn/git-secret

Would it be possible to install git-secret with npm?

Benefits :

  • same command for all platforms
  • we can add it to the project and new people to the project can simply install the correct version by running npm install (or yarn)

Maybe https://www.npmjs.com/package/git-secret is the same package already after all?

All 9 comments

Hello @aymericbouzy

I don't know the answer to your question, but I don't _think_ it makes sense to install the bash version of git-secret using npm (maybe someone can correct me here).

Also the package at
https://www.npmjs.com/package/git-secret
_appears_ to be a completely different system than this original version of git-secret by @sobolevn, which is sure to cause confusion in the wild.

I've reached out to the author of the npmjs package you link to above to see if we can sync up. Thanks for making us aware.

@sobolevn this thread may be of interest to you

I completely agree with @joshrabinowitz

It does not make much sense to use npm for bash apps.
Maybe we will change our opinion after rust version is out.

Just to explain why I thought it might be nice : previously, to get people started on my project, I simply had to tell them "run npm install and you're good to go!". It made a number of cli available such as :

  • serverless
  • expo
  • eslint
  • jest
  • babel-node
  • webpack
    ....

Now the installation steps are OS dependent and it is required to run a number of different commands.

This is a valid use-case, I agree. But, there's nothing we can do from our side right now.

Because:

  1. We cannot support npm alone. Why not supporting pip, cargo, hex, cabal and other package managers then?
  2. We cannot really be a js package. Because git-secret cannot be imported. We do not guarantee that it will work this way.
  3. npm scripts are also OS-related, it is just hidden from the end user

Related: there was briefly an npm package called git-secret, but it has been deprecated and now refers to this project and git repo. See https://www.npmjs.com/package/git-secret?activeTab=versions

Update: I just realised homebrew can be installed on Linux (and Windows using WSL): so this seems the easiest path...

Oh, wow! You can contribute this part to the Homebrew docs!

I just realised homebrew can be installed on Linux (and Windows using WSL): so this seems the easiest path...

Actually it's so slow ....... it works, but I cannot spend more time installing git-secret than building my project on CI 馃槄

So I just tried to install from source, and:

  1. it works right away.
  2. it's _really_ fast

So that's my new favorite install method 馃槃

git clone https://github.com/sobolevn/git-secret.git git-secret
(cd git-secret && make build && PREFIX="/home/rof" make install)

Note: I installed to /home/rof on Codeship Basic because I don't have the write to edit /usr/local. I'm not sure what this folder is for, I just tried a random one in the list in my $PATH 馃槄

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joshrabinowitz picture joshrabinowitz  路  3Comments

joshrabinowitz picture joshrabinowitz  路  7Comments

alumarcu picture alumarcu  路  3Comments

elmarsto picture elmarsto  路  4Comments

ghost picture ghost  路  8Comments