Here is a suggestion for updating the nostr:// git standard based on needs emerging from usage:

nostr://ssh/npub123/relay.damus.io/my-repo

nostr://npub123/my-repo?relayhint=relay.damus.io&server-protocol=ssh

nostr://naddr123*

*no support for specifying server protocol

note that `git clone nostr://...` will name the directory with anything after the final `/` unless a directory name is specified.

I personally think the first format has the best balance of conciseness and readability. To articulate it more precisely, rather than by example, it is:

`nostr://///`

I'd love some feedback before implementing. nostr:npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6 nostr:npub16r0tl8a39hhcrapa03559xahsjqj4s0y6t2n5gpdk64v06jtgekqdkz5pl nostr:npub16r0tl8a39hhcrapa03559xahsjqj4s0y6t2n5gpdk64v06jtgekqdkz5pl nostr:npub1uplxcy63up7gx7cladkrvfqh834n7ylyp46l3e8t660l7peec8rsd2sfek nostr:npub1s3ht77dq4zqnya8vjun5jp3p44pr794ru36d0ltxu65chljw8xjqd975wz

Reply to this note

Please Login to reply.

Discussion

Like.

nostr:npub1wqfzz2p880wq0tumuae9lfwyhs8uz35xd0kr34zrvrwyh3kvrzuskcqsyn nostr:npub1m4ny6hjqzepn4rxknuq94c2gpqzr29ufkkw7ttcxyak7v43n6vvsajc2jl

Having a means of specifying the git connection protocol looks good to me. Two things:

1. I personally prefer using a query string for relay hints and server protocol. It keeps the repo address itself concise and a little more human-friendly, while extra detail can be added as needed in the query.

2. In addition to npubs, will we be able to use NIP-05 addresses? Npubs are rather cumbersome. Ideally, I'd want to be able to type out a repo address into my command line, rather than always having to copy-paste it.

the query string doesn't work for macos users unless they put it in quote so I don't think we should be advocating this anymore. see nostr:nevent1qvzqqqqqqypzpgqgmmc409hm4xsdd74sf68a2uyf9pwel4g9mfdg8l5244t6x4jdqy2hwumn8ghj7ur4wfcxcetjv4kxz7fwvdhk6qpq7rxwfs2c9pzp2dukptp4ysxdwajpw0n6ejd0kjjxg87vkc9w3e9qf9ynpq

NIP-05 addresses are interesting. I always have to go to a profile to see what a users nip05 address is so I might as well copy the npub. On the other hand, its nice to be able to tell from the remote url who the user is and I can't recognise may users npubs. They are also more concise. Does anyone have an opinion on that?

I've implemented this with `?protocol=&user=` or `nostr://fred@ssh/npub...` to enable overrides for push.

I've also updated `ngit init` to default to using https clone urls, as this is the most sensible for fetch.

Given that most repo events include ssh clone urls, I'm tempted to just always use https for fetch and ssh for push (with a https fallback) unless the `protocol` override is used. push failures of ssh are instant whereas over https sometimes needs to be prompted for credentials.

Next up I need to actually implement the override.