Avatar
DanConwayDev
a008def15796fba9a0d6fab04e8fd57089285d9fd505da5a83fe8aad57a3564d
freedom tech developer and creator of ngit, https://gitworkshop.dev and https://metadata.nostr.com
Replying to Avatar redshift

btw, i was able to push to

https://gitworkshop.dev/npub16a6kfxprxgazyhc9ym6pe3dqmw4ran4uk50gu23nt0ttdecsavxs3cflrw/gitnostr.com/stats

but i'm not able to clone on a different device. pls help. nostr:npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr

git clone nostr://npub16a6kfxprxgazyhc9ym6pe3dqmw4ran4uk50gu23nt0ttdecsavxs3cflrw/gitnostr.com/stats

Cloning into 'stats'...

nostr: fetching...

✔ wss://relay.nostr.band no new events

✔ wss://nos.lol no new events

✘ wss://relay.ngit.dev connection timeout

✔ wss://relay.damus.io no new events

✘ wss://gitnostr.com connection timeout nostr: no updates

fetching relay.ngit.dev/npub16a6kfxprxgazyhc9ym6pe3dqmw4ran4uk50gu23nt0ttdecsavxs3cflrw/stats.git ref list over https (unauthenticated)...

list: https://relay.ngit.dev/npub16a6kfxprxgazyhc9ym6pe3dqmw4ran4uk50gu23nt0ttdecsavxs3cflrw/stats.git failed over https (unauthenticated): failed to connect to relay.ngit.dev: Operation timed out; class=Net (12)

list: relay.ngit.dev/npub16a6kfxprxgazyhc9ym6pe3dqmw4ran4uk50gu23nt0ttdecsavxs3cflrw/stats.git failed over https (unauthenticated)

fetching gitnostr.com/npub16a6kfxprxgazyhc9ym6pe3dqmw4ran4uk50gu23nt0ttdecsavxs3cflrw/stats.git ref list over https (unauthenticated)...

list: https://gitnostr.com/npub16a6kfxprxgazyhc9ym6pe3dqmw4ran4uk50gu23nt0ttdecsavxs3cflrw/stats.git failed over https (unauthenticated): failed to connect to gitnostr.com: Operation timed out; class=Net (12)

list: gitnostr.com/npub16a6kfxprxgazyhc9ym6pe3dqmw4ran4uk50gu23nt0ttdecsavxs3cflrw/stats.git failed over https (unauthenticated)

fetching relay.ngit.dev/npub16a6kfxprxgazyhc9ym6pe3dqmw4ran4uk50gu23nt0ttdecsavxs3cflrw/stats.git over https (unauthenticated)...

fetch: https://relay.ngit.dev/npub16a6kfxprxgazyhc9ym6pe3dqmw4ran4uk50gu23nt0ttdecsavxs3cflrw/stats.git failed over https (unauthenticated): failed to connect to relay.ngit.dev: Operation timed out; class=Net (12)

fetch: relay.ngit.dev/npub16a6kfxprxgazyhc9ym6pe3dqmw4ran4uk50gu23nt0ttdecsavxs3cflrw/stats.git failed over https (unauthenticated)

fetching gitnostr.com/npub16a6kfxprxgazyhc9ym6pe3dqmw4ran4uk50gu23nt0ttdecsavxs3cflrw/stats.git over https (unauthenticated)...

fetch: https://gitnostr.com/npub16a6kfxprxgazyhc9ym6pe3dqmw4ran4uk50gu23nt0ttdecsavxs3cflrw/stats.git failed over https (unauthenticated): failed to connect to gitnostr.com: Operation timed out; class=Net (12)

fetch: gitnostr.com/npub16a6kfxprxgazyhc9ym6pe3dqmw4ran4uk50gu23nt0ttdecsavxs3cflrw/stats.git failed overhttps (unauthenticated)

Error: fetch: failed to fetch objects in nostr state event from:

- relay.ngit.dev/npub16a6kfxprxgazyhc9ym6pe3dqmw4ran4uk50gu23nt0ttdecsavxs3cflrw/stats.git failed over https (unauthenticated)

- gitnostr.com/npub16a6kfxprxgazyhc9ym6pe3dqmw4ran4uk50gu23nt0ttdecsavxs3cflrw/stats.git failed over https (unauthenticated)

You experienced a timeout issue. I could clone the repository without any problems. Can you try cloning again. Your repository clones fin both gitnostr.com and realy.ngit.dev timed out. I control both of these and really need to sort out some better performing infrastructure for them.

Welcome to the Git Nostr community! Its great to see you are building and that you're building on the existing work in the space.

It looks like you may have started with a fork of an early git nostr project that created a github like UI that had ideas about intergrating https://github.com/spearson78/gitnostr which emerged at the time and but was quickly abandoned. I see with gittr you have taken that idea and run with it and also began to try and reconcile / add / intergrate new Git Nostr invovations such as GRASP with spearson78 approach. I'm not sure how easy that would be as they don't appear to be compatible. The active work in Git Nostr space all seems to be based on NIP-34. Would you consider change gears towards NIP-34 / GRASP for greater compatibility with the ecosystem?

Replying to Avatar fiatjaf

It's here: https://gitworkshop.dev/fiatjaf.com/nostrlib/tree/master/khatru/grasp/server.go

But I'm still confused about the PR events and refs/nostr/ stuff and how are these related to patches.

I was thinking that would be nice to expose received patches as refs so they could be fetched by git directly, is that what that means?

It took me much longer than I anticipated to Implement PRs in ngit because its hard to get a good UX. If you cant write to the repositories grasp servers (or they don't list any) you have to write to another grasp server. This involves selecting a grasp server (which is hard to do without hardcoded defaults, although WoT based 'user grasp list' is possible but filtering based on whether they are likely to accept your data might a challenge). Then it needs to send a repo annonucement with a 'personal-fork' tag (to prevent it from appearing like you own the project) and push the entrire repo there. If its a big repo that could be 1gb push.

Once there are more (and reliable) grasp servers available and most nostr git repositories are primarily using them I think it will work much better.

Replying to Avatar fiatjaf

It's here: https://gitworkshop.dev/fiatjaf.com/nostrlib/tree/master/khatru/grasp/server.go

But I'm still confused about the PR events and refs/nostr/ stuff and how are these related to patches.

I was thinking that would be nice to expose received patches as refs so they could be fetched by git directly, is that what that means?

PR events sit completely parallel with patches. I considered whether grasp servers should accept patch git data as refs/nostr/ or even generate the ref when patch events are received.

For:

1. clients that choose just to implement only PRs could easily extend to add basic support for patches by treating them as PRs (root patch map to the PR event and additional patches map to PR updates but follow nip10 rather than nip22).

Against:

1. it encourages clients not to implement applying patches

2. patches not sent to a grasp server wouldn't show up in these clients. Showing some but not all is bad UX.

3. patches not accepted by the repository grasp servers wouldn't show up (there are no grasp server hints like in PR events).

4. its another thing for grasp servers to implement

Replying to Avatar fiatjaf

To me sets with canonical names are an antipattern (see discussion in https://github.com/nostr-protocol/nips/pull/880 and the trouble we all had to prune the spec from these).

I think the concept of "starred" is just publishing a reaction to a repository (with a "k" tag of "30617"). Those can easily be queried later.

Following should be a simple list, either if you want to follow a repository to see everything that happens in it or someone to see their repositories and the patches they send elsewhere.

That should be the base and the simplest thing to implement. Sets are much more complex.

Organizing people and repositories in sets can be done (like for all the other lists we also have sets) but honestly that's more like a power user feature and we should postpone that to 2027 because there aren't even enough repositories today to fill a short simple list.

That all makes total sense. Reacting to a repository isn't and shouldn't be the same as following it.

Replying to Avatar Basanta Goswami

yes that's the repo. i am sharing some terminal output for you to see if it's working fine

basantagoswami@asus:~/Workspace/UnsignedLabs/keyboard$ ngit account login

✔ logged in to local git repository as basantagoswami · remain logged in

basantagoswami@asus:~/Workspace/UnsignedLabs/keyboard$ cat .git/config

[core]

repositoryformatversion = 0

filemode = true

bare = false

logallrefupdates = true

[user]

email = 36882714+basantagoswami@users.noreply.github.com

[remote "origin"]

url = nostr://npub1gmm2ehusvs35zgh6pq84m8hkj4ea0ygy3c9j2e3slzhjjce3kmns5tdaz2/relay.damus.io/keyboard

fetch = +refs/heads/*:refs/remotes/origin/*

[branch "main"]

remote = origin

merge = refs/heads/main

[nostr]

repo = naddr1qqyxketevfhkzunyqgsyda4vm7gxgg6pytaqsr6anmmf2u7hjyzguze9vcc03tefvvcmdecrqsqqqaueky2g8v

bunker-uri = bunker://[REDACTED]?relay=wss://relay.damus.io

bunker-app-key = [REDACTED]

npub = npub1gmm2ehusvs35zgh6pq84m8hkj4ea0ygy3c9j2e3slzhjjce3kmns5tdaz2

basantagoswami@asus:~/Workspace/UnsignedLabs/keyboard$ ngit init

fetching updates...

✘ wss://relay.nostr.band timeout after 7s timeout

✔ wss://relay.snort.social/ no new events

✔ wss://gitnostr.com no new events

✔ wss://relay.mostr.pub no new events

✔ wss://nos.lol no new events

✔ wss://relay.ngit.dev no new events

✔ wss://relay.damus.io no new events no updates

searching for profile updates...

✘ wss://relay.nostr.band timeout after 7s timeout

✔ wss://relay.damus.io no new events

✔ wss://relay.snort.social/ no new events

✔ wss://relay.mostr.pub no new events

✔ wss://nos.lol no new events logged in as basantagoswami to local repository

? repo name (keyboard) › CTRL+C

basantagoswami@asus:~/Workspace/UnsignedLabs/keyboard$ cat ~/.gitconfig

[init]

defaultBranch = main

[core]

editor = code --wait

[diff]

tool = vscode

[difftool "vscode"]

cmd = code --wait --diff $LOCAL $REMOTE

[merge]

tool = vscode

[mergetool "vscode"]

cmd = code --wait $MERGED

[cinnabar]

version-check = 1729936304

[nostr]

bunker-uri = bunker://[REDACTED]?relay=wss://relay.damus.io

bunker-app-key = [REDACTED]

npub = npub12ucpp6c0g070cffu9z2c9rfsha5nnvzk8p8ze3ny3aqqj6k2aa8q0c52sm

if i continue here, it's not clear what will happen

? repo name (keyboard) ›

i think i did it last time and then when i did git push, it showed up in the new repo that was created under this npub, instead of the original one. am i supposed to see the ? repo name prompt?

You CTRL-C exited the interactive `ngit init` command before publishing the event. `? repo name (keyboard) > ` is a prompt for the name of the repo, defaulting to 'keyboard'. So press enter to continue.

No! At the risk of duplicating the conversation on the NIP PR nostr:npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6 just opened:

In nostr:nevent1qvzqqqqqqypzpgqgmmc409hm4xsdd74sf68a2uyf9pwel4g9mfdg8l5244t6x4jdqqs9ydqwez3x2k3e5rk8tmjkumg5zgf6xf8054zudfru0m9cc0p6slsf4n332 I proposed we should add a Git repository 'set' with a default d=starred that acts as a follow list.

but maybe a 'standard' NIP-51 git repository follow list like that PR suggests is better. Would / should clients label this list as starred repositories? I think may git clients will want to inherit the 'starred' concept from github but I there is an overlap with reactions, zaps and a repository follow list.

We should definately add git repositories as a set.

BudaBit is using lists for git repositories so we should also build on their work nostr:npub1ehhfg09mr8z34wz85ek46a6rww4f7c7jsujxhdvmpqnl5hnrwsqq2szjqv nostr:npub16p8v7varqwjes5hak6q7mz6pygqm4pwc6gve4mrned3xs8tz42gq7kfhdw.

This UX needs to be tightened up. Maybe it should detect that the signed in account is attempting to push to a repo that they have been added to as a mantainer and auto accept the invite (issue an announcement event listing the other maintainers) before completeing the push.

also have a GUI to manage this eg in gitworkshop this would be nice.

Replying to Avatar Basanta Goswami

Also for nostr:nprofile1qqs2qzx779ted7af5rt04vzw3l2hpzfgtk0a2pw6t2plaz4d2734vngnh633s, I am not sure how I am supposed to collaborate using ngit and GRASP. If I publish a repo using npub1x, but want to continue working on it using npub1y, how do I do it? I created a repo using nostr:nprofile1qqs9wvqsav858l8uy57z39vz35ct76fekptrsn3vcejg7sqfdt9w7nsej99y3, the bunker URL was added to the global ngit. I added my own npub (this profile) as a maintainer. I then tried pushing from the terminal but was shown that I was added as a maintainer, but haven't accepted the invite yet, and was asked to use ngit init again. I couldn't figure out how to accept, so ran ngit init. Once I did that, I think it just created another repo under this npub and any pushes just go to that repo instead of the original one

I want to publish repos using the Unsigned profile, and then continue working using this profile, I don't understand how to do that yet

Is the repository 'keyboard'?nostr:naddr1qvzqqqrhnypzq4eszr4s7slulsjnc2y4s2xnp0mf8xc9vwzw9nrxfr6qp94v4m6wqy28wumn8ghj7un9d3shjtnyv9kh2uewd9hsqzrtv4ukymmpwfjqh0ukvh

Your npub is listed as a maintainer but it hasn't issue an announcement event which 'accepts' the invite.

This means you haven't successfully run `ngit init` under this npub. Maybe you ran it again under the other npub thus just updating the announcement? Run `ngit account login` to switch accounts before running `ngit init.

was it still failing after I fixed the nostrlib repo on relay.ngit.dev and gitnostr.com (8+hrs ago) before you updated ngit? If not, I wonder whether the 500 error on one git server was causing ngit to fail on all the others?

Replying to Avatar fiatjaf

nostr:npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr my "nak git push" command (that I just made) was able to successfully push to relay.ngit.dev and gitnostr.com yesterday, but now when calling "git push" directly (nak calls it underneath) it fails with "fatal: unable to access 'https://relay.ngit.dev/npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6/nostrlib.git/': The requested URL returned error: 500".

ngit is still unable to push.

Did you abandon this issue entirely or are you cooking something? How can I help you more?

It looks like the 500 error relates to a permissions issue on some directories within the bare repository which in have fixed for now. I'm cooking a better grasp implementation. nostr:nevent1qqsv8apuvtt0c9zp3pjyxvwf4652jhg69dsg8kas6pfhef0qs7rsrwcpz4mhxue69uhhyetvv9ujuerpd46hxtnfduhsyg9qpr00z4uklw56p4h6kp8gl4ts3y59m874qhd94ql732k40g6kf5psgqqqqqqskeqh9s

Replying to Avatar fiatjaf

I'm not sure how I can add that. What is the ngit command I need?

In the meantime I cooked up my own gitpusher and I get these errors trying to push with it:

Found nostr remote: npub=npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6, relay=relay.ngit.dev, identifier=nostrlib

Querying relay: wss://relay.ngit.dev

Found 5 events

Found announcement event: id::9a232a6aab42c073a6423d6324271ce13694b4ea29e43d00c8b4fa059bb0c2a5

Found state event: id::e44e0f98750f943b215ffe09c1034bc5d95ea36a487d36e84f2764915740e118

Current branch: master, commit: 4b2cec9c6d68b01aa40a0457f623afc932faac02

> setting branch master to commit 4b2cec9c6d68b01aa40a0457f623afc932faac02

> publishing updated repository state id::19167b21dbe3cc93451769dbbfedf5684829fd06933d774aa2974d763092a62f

> published to relay wss://relay.ngit.dev

> published to relay wss://nos.lol

> published to relay wss://relay.nostr.band

> published to relay wss://gitnostr.com

(!) error publishing event to relay wss://relay.damus.io: publish: given up waiting for an OK

> pushing to: https://relay.ngit.dev/npub1jlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qdjynqn/nostrlib.git

(!) failed to push to https://relay.ngit.dev/npub1jlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qdjynqn/nostrlib.git: exit status 1

remote: error: cannot push master to 4b2cec9 as nostr state event is at 59bd3c2

To https://relay.ngit.dev/npub1jlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qdjynqn/nostrlib.git

! [remote rejected] master -> master (pre-receive hook declined)

error: failed to push some refs to 'https://relay.ngit.dev/npub1jlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qdjynqn/nostrlib.git'

> pushing to: https://gitnostr.com/npub1jlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qdjynqn/nostrlib.git

(!) failed to push to https://gitnostr.com/npub1jlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qdjynqn/nostrlib.git: exit status 1

remote: error: cannot push master to 4b2cec9 as nostr state event is at 59bd3c2

To https://gitnostr.com/npub1jlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qdjynqn/nostrlib.git

! [remote rejected] master -> master (pre-receive hook declined)

error: failed to push some refs to 'https://gitnostr.com/npub1jlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qdjynqn/nostrlib.git'

Apparently the pre-receive hooks are denying my pushes because they have the wrong state.

But if I query the state directly from wss://relay.ngit.dev and wss://gitnostr.com I get 312cc32da517b290a09532e23a103745cb9f4cd4 for one and 4b2cec9c6d68b01aa40a0457f623afc932faac02 for the other. "4b2c" is the correct one (the commit I'm trying to push), "312c" is a totally unrelated one (not even mentioned in the error message).

So there seems to be some mismatch between the state events and the internal state of the pre-receive hook.

There seems to be a range of issues going on here. I identified a permissions issue resulting from a data migration which may have fixed the nostrlib repo on gitnostr.com and relay.ngit.dev it for now(?). I'm building a better grasp implementation contained within a single binary which should be easier to debug.

This is gitworkshop. I'm using nostr-editor with Markdown enabled and clearly the markdown URL style is overriding the nostr style. I'll sort that unless nostr:npub1cesrkrcuelkxyhvupzm48e8hwn4005w0ya5jyvf9kh75mfegqx0q4kt37c, who maintainers that library, beats me too it.

Do you get the same error with older versions of ngit? The last time rust-nostr changed the connection logic was v0.39 according to the change log and its on v0.44 now. I only noticed this as an intermittent problem in the last 2 weeks. It effected connecting to other relays but never all the repo relays at once. This makes me think its a rust-nostr/ngit ssue rather than a problem at the relay end. I bumped master to rust-nostr v0.44.1 yesterday.

I've noticed this in the last few weeks so maybe its that:

nostr:nevent1qqszn6ry86u7z6qxyxeq98qgaxnruhpetg6la6rt3gl6dl0hf0a2edc5c33kd

I'll need to debug further when it happen to Mr again. Are you still getting the same issue?

I think developers want to set it in one place and have it 'just work' whenever a branch is pushed. We could bundle web hooks / CI/CD config that doesn't live in the git repo into either a new event or the repo announcement. We could potentially encrypt secrets nip44 style to the pubkey of the a selected grasp operator.

Companies think they own the data they collect on you. GDPR tries give you some control over this data.

It's common practise with user provided content to replace multiple consecutive line breaks with just a paragraph size margin. This is in reference to the space above "If you can't tell..."

Its about the significance of human freedom, the moral weight of our choices and how we live meaningfully and ethically.

He argues that the story is not about fleeing from knowledge but embracing it responsibly, recognizing that our decisions shape our lives and our world.

Devs will prompt LLMs to do the debugging, telliing them exactly where to look and how to solve the issue. They will pay LLMs for the privilege. Vibe coders will benefit.

Replying to Avatar elsat

What about cold pressed rapeseed oil? https://borderfields.co.uk/faqs/

Heavy rate limiting of unauth github requests incoming. KYC every request or face inconvenience. https://github.blog/changelog/2025-05-08-updated-rate-limits-for-unauthenticated-requests/