pull down to refresh

Looks like you're missing the --npub argument when piping to sh

72 sats \ 6 replies \ @mf OP 2 Apr

Thank for the feedback. Patched 0.2.2 is available. Want to give another try?

reply

Like I indicated: missing nostr-tools/nip19

node:internal/modules/package_json_reader:301
  throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), null);
        ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'nostr-tools' imported from /[eval]
    at Object.getPackageJSONURL (node:internal/modules/package_json_reader:301:9)
    at packageResolve (node:internal/modules/esm/resolve:768:81)
    at moduleResolve (node:internal/modules/esm/resolve:859:18)
    at defaultResolve (node:internal/modules/esm/resolve:991:11)
    at #cachedDefaultResolve (node:internal/modules/esm/loader:719:20)
    at #resolveAndMaybeBlockOnLoaderThread (node:internal/modules/esm/loader:736:38)
    at ModuleLoader.resolveSync (node:internal/modules/esm/loader:765:52)
    at #resolve (node:internal/modules/esm/loader:701:17)
    at ModuleLoader.getOrCreateModuleJob (node:internal/modules/esm/loader:621:35)
    at onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:650:32) {
  code: 'ERR_MODULE_NOT_FOUND'
}

It be good if you test it yourself. Just use my pipe, it's easy:

docker run -it alpine /bin/ash -c "apk update && apk add curl nodejs npm && curl -fsSL https://nostr-svrn.codeberg.page/install.sh | sed 's/set -e/set -ex/' | sh"
reply
72 sats \ 3 replies \ @mf OP 2 Apr

I thought I did... 0.2.3 is now available.

reply

I get to the wizard now!

But when I should input it already quit the script.

Is there a way to just manually configure?

╔══════════════════════════════════════════════╗
║  git-nostr-sign  ·  setup wizard             ║
╚══════════════════════════════════════════════╝

  This wizard will:
    1. Set publisher identity (import nsec, Amber, or new keypair)
    2. Deploy a NIP-05 address to Codeberg Pages (free)
    3. Configure your git to sign commits with your Nostr key

  Press Ctrl+C at any time to cancel.


─── Phase 1 · Tool Identity ─────────────────────

Publisher identity (NIP-05 + release metadata)
  1.  Import existing nsec or hex     — reuse a key you already have
  2.  Amber (NIP-46)                  — private key stays on your phone
  3.  Generate new dedicated keypair  — fresh “project” publisher key

Enter number: / # 1
/bin/sh: 1: not found
reply
10 sats \ 1 reply \ @optimism 2 Apr

Tested through npm run setup, which doesn't terminate on the menu when ran like that.

Findings from setup process:

  1. QR cannot be read by Amber when using a standard macos terminal font
  2. Amber through bunker doesn't seem to work - the app never talks to Amber, according to Amber (others do) I tried with multiple relays
  3. When going the new keypair route (option 3), I get the npub echo'd to me, but then after skipping step 2 (because codeberg is still centralized, so let's not) I am asked to type the nsec. This is odd, because I was never given it. When I enter nothing, it terminates.

You really, really, really need more testing.

reply
72 sats \ 0 replies \ @mf OP 3 Apr

That's true. Appreciate the feedback.

0.3.0:

➤ git-nostr-setup -h

git-nostr-setup / npm run init -- …  —  interactive wizard (default)

Non-interactive (--non-interactive or -N):

  Identity (pick one):
    --generate-identity           New random keypair (commits + updater)
    --identity-nsec <nsec|hex>   Existing key (also: GNS_IDENTITY_NSEC)
    --bunker-url <bunker://…>   Amber NIP-46 (approve on phone; GNS_BUNKER_URL)
    --reuse-identity              Keep identity.json, refresh signing + git only

  Signing override (optional — at most one):
    --signing-nsec …             Different local key for commits
    --signing-bunker-url …       Different Amber bunker for commits

  Git (pick one):
    --git-global                 Global gpg.program + signing
    --git-local                  This repo only (must be inside a git work tree)
    --no-git-config              Only write config.json / identity.json

    --no-pre-push-hook           Skip core.hooksPath .githooks

  Examples:
    git-nostr-setup -N --generate-identity --git-global
    git-nostr-setup -N --identity-nsec "$GNS_IDENTITY_NSEC" --git-global
    git-nostr-setup -N --bunker-url 'bunker://…' --git-local

  NIP-46 still needs Amber approval the first time. QR: set GNS_QR_SMALL=1 for a smaller pattern.
  Secrets in argv hit shell history — prefer env vars.
reply

Here's what the command does:

  1. docker run -it alpine /bin/ash -c ... Get clean alpine image, call its shell (interactively) to execute a script
  2. apk update && apk add curl nodejs npm ... install the prerequisites
  3. curl -fsSL https://nostr-svrn.codeberg.page/install.sh - your install script
  4. | sed 's/set -e/set -ex/' | sh - edit the set -e line to make it echo back so we can debug
reply

Same result with that. This command structure is taken from the site, not the post here

reply
73 sats \ 1 reply \ @unboiled 2 Apr

Right. Maybe you can set PUBLISHER_NPUB=... for the last command in-line.
It seems to look there.

reply

Yeah. I can edit the script. There's other problems too that I foresee in the immediate next step... But it doesn't even get there.

(It expects to have nostr-tools/nip19 but as you see in the log, that wasn't fetched)

reply