Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

key/import returns HTTPError: file argument 'key' is required #3535

Closed
rob-deutsch opened this issue Feb 7, 2021 · 2 comments
Closed

key/import returns HTTPError: file argument 'key' is required #3535

rob-deutsch opened this issue Feb 7, 2021 · 2 comments

Comments

@rob-deutsch
Copy link

Version information:

go-ipfs version: 0.7.0
Repo version: 10
System version: amd64/windows
Golang version: go1.14.4

Description:

There's an incompatibility with ipfs-http-client key import using pem and password resulting in an HTTPError: file argument 'key' is required

Steps to reproduce the error:

    const ipfsClient = require('ipfs-http-client')
    const ipfs = ipfsClient(await ipfsClient({
	url: __REMOTE_API_ADDRESS__, //Connect with go-ipfs node
	agent: ...
    })
    const key = await crypto.keys.generateKeyPair('rsa', 2048)
    const pem = await key.export("temppassword")
    const { id } = await ipfs.key.import(keyName, pem, "temppassword")

See this issue: ipfs/go-ipfs#7879

The relevant code is here:

const res = await api.post('key/import', {

@welcome
Copy link

welcome bot commented Feb 7, 2021

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@jacobheun
Copy link
Contributor

Duplicate of #3547

@jacobheun jacobheun marked this as a duplicate of #3547 Feb 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants