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.
Login to reply
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
```
Same here just as Laeserin mentioned.
v1.4.5 should fix this under bash
I'm closing this as a duplicate of View quoted note โ
also reported here: View quoted note โ
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)
Page Not Found - Official Apple Support
Page Not Found
Have v1.4.5 now, but it stayed the same.
Your still getting the 'no repo event at specified coordinates' error?
And you definitely installed to upgraded remote helper too?
$ 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
Do I have to manually set GIT_DIR?
Git calls the remote helper with that environment variable set along with a few others.
So, no?
correct
this is failing because the nostr url points to @Laeserin ๐ป๐ฆ who doesn't have a git repository with the identifier Alexandria. try @Silberengel
a good way of finding the right nostr url to use is to view
as you can select a repo and copy the clone url via the green 'clone' button
GitWorkshop.dev
Decentralized github alternative over Nostr
OMG Duh
Okay, it worked!
But I now have a folder called 'Alexandria?relayhint=nostr.thesamecat.io' even inluding the apostrophes. Can it just be called Alexandria or do I have to rename it?
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.
Oh, I didn't even see that bright green button. Sort of hard to miss.
advertising has trained us to ignore bright shiny things on websites.
I'm open to suggestion on how to make it clearer. the 'new issue' and clone buttons are perhaps too similar.
Yeah, they all look the same. Maybe something more subtle, next to the name?
I could use one of the other coloured buttons. If I remember correctly its the most prominent thing on the github repo page. A big green button called 'Code'.
It is. Maybe it's just too far off, to the right. Out of the field I was looking at. Legit didn't even notice it was there.
I moved it and tried a few other things but not 100% happy. Maybe I should pull the instructions out of the down to makenitnmore prominent?
I think it looks pretty good, actually. ๐ค
Thanks. We will stick with that for now then.
As of ngit 1.4.5, with zsh the git clone command trips over `?relayhint=nostr.sprovoost.nl`
It does work with bash.
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