IPNS helper
See https://github.com/magik6k/git-remote-ipld/issues/3#issuecomment-340269048
@magik6k what else needs to be done to get the IPNS helper working?
2 most significant things:
- [ ] Publish to IPNS, integrate with keystore nicely (ipns helper currently returns unixfs tree the ipns record should point at)
- [ ] Implement some mechanism to map large git objects (> 1mb) to ipfs files (see https://github.com/ipfs/go-ipld-git/issues/18 (4.)).
When you say "integrate with keystore nicely" do you mean that when pushing the first time, the IPNS git helper should create a new key in the key store, and associate the unixfs tree with that key in IPNS?
maybe not 'associate the unixfs tree', but something like:
git [push/pull] ipns::keystoreKeyName should work. Integrating with dnslinks would be a nice feature too (we'd need to resolve first to see if the dnslink resolves to /ipns name and then see if we have a key for that name in the keystore)
push should also print ipns::QmKey like it currently does with the ipld helper
Currently it prints the IPFS hash of the patched object with an ipns:: prefix, eg
Pushed to IPFS as ipns::Qmeue...
Do you think it would make sense to instead update the IPNS key to point to this IPFS key and print
Pushed to IPFS as /ipfs/Qmeue...
Updated IPNS key /ipns/QmIPNSKey to point to /ipfs/Qmeue...
We could print both, but it might be confusing for some users. I'd keep the ipns:: prefix as it allows for easier copy-paste, and only print ipns key to not confuse users unfamiliar with ipfs.
Ok so I'm imagining that the user would do one of the following:
-
git push --set-upstream ipns::/ipns/QmIPNSkey branchname -
git push --set-upstream ipns:: branchnameIn the second case the ipns helper would mint an ipns key for the user
At the end it would print
Pushed to IPFS as ipns::/ipns/QmIPNSkey...
Does that sound right?
Yep, that's about right. We might also want to store mapping between branches and keys in the tracker
It seems like there is a bug in go-ipfs-api ipns name publish so I will wait till you have completed the work on core API
Think we can move forward on this now?
I thought this doesn't really work?
Unless I did something wrong when I was trying to use it - https://gist.github.com/mainiak/03f202480405affca3fd80dd8f6a7008