Hey Nostr and npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr !

Please help me with this issue and I can pay sats for your time:

## Native git commands failing with git-remote-nostr

I was able to make ngit work and the SatShoot repo was pushed to Gitworkshop.dev.

However, when I try to use git fetch or push or clone native commands with the remote that is configured with the nostr:// URL, git complains with "git: 'remote-nostr' is not a git command. See 'git --help'. " error message.

Other details:

- I installed ngit and git-remote-nostr with cargo and they are recognized on $PATH

- I am using a nix devshell setup with the 'GIT_REMOTE_HELPERS' env variable exported correctly with the 'nostr' string added next to other built-in transfer protocols.

What could be wrong and how to make this work?

Make an offer on this URL:

https://satshoot.com/naddr1qvzqqqrllupzp5zweue6xqa9npf0md5pak95zgsph2za35sentk88jmzdqwk925sqquyuct5d9mx2tt8d96z6cm0d4kkzmnywvkkvctfd35kueedwa5hg6pdva5hgttjv4kk7ar994hx7um5wgkk6er3wcukyuyh3em

#satshoot #asknostr #git #ngit #git-remote-nostr #nix_os #nix

Reply to this note

Please Login to reply.

Discussion

SatsShoot looks really interesting!

Why are you setting the GIT_REMOTE_HELPERS environment variable? usually git just looks for a command named 'git-remote-nostr' and uses that. I wonder if your custom setup with GIT_REMOTE_HELPERS is causing issues. Can you try without it to see if that's the root of the problem?

Thanks will try as soon as I get home!

Done. No success yet :/

Same error:

```

git: 'remote-nostr' is not a git command. See git --help'.

```

Reading the [git-scm docs](https://git-scm.com/docs/gitremote-helpers) it says sth about

"git remote-"

I guess that should be the mechanism git-remote-nostr is using but I haven’t checked your code.

If I try to invoke the binary cargo installed it is auto-completed and in its place on my PATH.

Could not say what I'm doing wrong :(

that error suggests that git cannot find the remote helper.

in a vanilla setup it will use the binary so long as its in the $PATH and called git-remote-.

have you set the `GIT_EXEC_PATH` environment variable by any change? in that instance the remote helper needs to be in that location.

Can you share your nix devshell setup, or at least the relevant sections?

You might be right... I setup the binary cargo installed in the devshell flake not in the configuration.nix where the git package is defined on the nixOS level.

Let me try sth and update you with result. Then if it doesn't help I'll share my nix setup!

My lord it's fixed!

Thanks for the hints!

Actually what was wrong is that I added git-remote-nostr to path with a tilde like

'~/.cargo/bin'

What worked was

'$HOME/.cargo/bin'

I don't actually know why but in the shell everything seemed fine I could invoke the command but git could not access it the first way.

I'll zap your Offer in SatShoot!

Thanks for the help amd for your great project!

I feel blessed!

Wow. Thanks for the mega zap!

Let me know how you get on and I'm always here if you need anything or if you have any questions / feedback.

How can I make the installation experience easier for NixOS users?

The best would be to package ngit and git-remote-nostr with nix and publish it to github. [Hydra](https://github.com/NixOS/hydra) can help with CI too.

This way it will be available on nixos.org and easily searchable and be included in a nix config.

Also publishing something nix-bitcoin does like a configurable, modularized template helps a lot. It's a lot of work though.

Thanks, I already a nix flake to manage the dev environment and for running CI tests. I'd like to use it for cross platform builds and stop relying on github actions.

That's great to hear!

So you're familiar with nix.

This is the way :)