Open magik6k opened 7 years ago
@magik6k what else needs to be done to get the IPNS helper working?
2 most significant things:
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:: branchname
In the second case the ipns helper would mint an ipns key for the userAt 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
See https://github.com/magik6k/git-remote-ipld/issues/3#issuecomment-340269048