Arjen's avatar
Arjen 1 year ago
MacOS zsh cannot clone repository ngit Version 1.4.4 MacOS version: 14.1.2 I cannot clone a repository using zsh in MacOS, which is the default shell for this OS. output: ```zsh zsh: no matches found: nostr://npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit?relayhint=relay.damus.io ``` It works under bash.

Replies (27)

It doesn't work for me under bash. I get ```console $ git clone nostr://npub1m4ny6hjqzepn4rxknuq94c2gpqzr29ufkkw7ttcxyak7v43n6vvsajc2jl/Alexandria?relayhint=nostr.thesamecat.io Cloning into 'Alexandria?relayhint=nostr.thesamecat.io'... nostr: no updates Error: no repo events at specified coordinates ``` ```console $ git-remote-nostr --help Error: git should set GIT_DIR when remote helper is called Caused by: environment variable not found ```
ngit 1.4.5 โฏ git remote add ngit nostr://npub1qe3e5wrvnsgpggtkytxteaqfprz0rgxr8c3l34kk3a9t7e2l3acslezefe/nuxstr?relayhint=wss%3A%2F%2Fnostr.sebastix.dev%2F zsh: no matches found: nostr://npub1qe3e5wrvnsgpggtkytxteaqfprz0rgxr8c3l34kk3a9t7e2l3acslezefe/nuxstr?relayhint=wss%3A%2F%2Fnostr.sebastix.dev%2F โฏ bash The default interactive shell is now zsh. To update your account to use zsh, please run `chsh -s /bin/zsh`. For more details, please visit bash-3.2$ git remote add ngit nostr://npub1qe3e5wrvnsgpggtkytxteaqfprz0rgxr8c3l34kk3a9t7e2l3acslezefe/nuxstr?relayhint=wss%3A%2F%2Fnostr.sebastix.dev%2F bash-3.2$ git remote -v gitlab git@gitlab.com:sebastix-group/nostr/nuxstr.git (fetch) gitlab git@gitlab.com:sebastix-group/nostr/nuxstr.git (push) ngit nostr://npub1qe3e5wrvnsgpggtkytxteaqfprz0rgxr8c3l34kk3a9t7e2l3acslezefe/nuxstr?relayhint=wss%3A%2F%2Fnostr.sebastix.dev%2F (fetch) ngit nostr://npub1qe3e5wrvnsgpggtkytxteaqfprz0rgxr8c3l34kk3a9t7e2l3acslezefe/nuxstr?relayhint=wss%3A%2F%2Fnostr.sebastix.dev%2F (push) origin git@github.com:Sebastix/vue-nuxt-nostr-ndk.git (fetch) origin git@github.com:Sebastix/vue-nuxt-nostr-ndk.git (push)
$ git clone nostr://npub1m4ny6hjqzepn4rxknuq94c2gpqzr29ufkkw7ttcxyak7v43n6vvsajc2jl/Alexandria?relayhint=nostr.thesamecat.io Cloning into 'Alexandria?relayhint=nostr.thesamecat.io'... nostr: no updates Error: no repo events at specified coordinates $ git-remote-nostr --help Error: git should set GIT_DIR when remote helper is called Caused by: environment variable not found $ git-remote-nostr --version v1.4.5 $ ngit --version ngit 1.4.5
you can rename it or name it as part of the clone command `git clone nostr://npub123/my-repo my-repo-directory if you think it should default to the identifier please comment here: View quoted note โ†’ Do you think its worth changing? I think its only ngit that currently uses it so no other client will need to change.
Unless the url is passed in quotes, zsh (terminal emulator on macos) interprets the `?` as a pattern matching and produces the `zsh: no matches found` error. In the next ngit release a different format for the nostr url will be supported that doesn't include this gotcha for macos users. When that's out also I'll update gitworkshop.dev to produce this format. cc: @Laeserin ๐Ÿ‡ป๐Ÿ‡ฆ @Sebastix
โ†‘