Get key by name

It is possible to list the key/name pairs like this:

> ipfs key list -l --ipns-base b58mh
12D3KooWF44SaSomGuUSNycgpkRwQcxcsMYeNbtn6XCHPR2ojodv self           
12D3KooWMNrGeGSAMw64MCBsqiFy3B67vZb6bRmHnxsT9QazWBAL test1
12D3KooWSBaU3k8BSmKZS319v7uqHabrXqxidxAnveiL3NjfYZgm test2  
12D3KooWDisrDBrcQfjGcYd7iGin8JoTmSMva5isCDuu9kieUR7H test3 

It would be nice to add a way to get a key by name like:

> ipfs key get --name test2

Is it worth opening a feature request issue on kubo repo? I do not see an existing one.

PS: related to How IPNS, "ipfs key" keystore file name are made? which answers how to get the key in command line. It should also be possible via the RPC API.

1 Like

Just an amateur in this regard, but I believe this is by design. Ref. ipfs key export (key with name doesn't exist) · Issue #8327 · ipfs/kubo · GitHub

You are right that the private key should not be accessible this way, but my message was about the public key, which is the IPNS entry

Feel free to open a feature request or better yet, a PR.

I agree that this would be useful.

1 Like

No time yet to open a PR, so here is the feature request: Get key by name · Issue #10415 · ipfs/kubo · GitHub.

1 Like