ipfs-shipyard / git-remote-ipld

MIT License
147 stars 33 forks source link

IPNS helper #4

Open magik6k opened 6 years ago

magik6k commented 6 years ago

See https://github.com/magik6k/git-remote-ipld/issues/3#issuecomment-340269048

dirkmc commented 6 years ago

@magik6k what else needs to be done to get the IPNS helper working?

magik6k commented 6 years ago

2 most significant things:

dirkmc commented 6 years ago

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?

magik6k commented 6 years ago

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)

magik6k commented 6 years ago

push should also print ipns::QmKey like it currently does with the ipld helper

dirkmc commented 6 years ago

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...

magik6k commented 6 years ago

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.

dirkmc commented 6 years ago

Ok so I'm imagining that the user would do one of the following:

At the end it would print Pushed to IPFS as ipns::/ipns/QmIPNSkey...

Does that sound right?

magik6k commented 6 years ago

Yep, that's about right. We might also want to store mapping between branches and keys in the tracker

dirkmc commented 6 years ago

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

Arlodotexe commented 1 year ago

Think we can move forward on this now?

mainiak commented 1 year ago

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