1

I tried using the following command

geth --testnet account import <path_to_key_file>

I am getting the following error:

Fatal: Failed to load the private key: unexpected EOF

Note that my key is the actual key I used while creating the account. Am I doing something wrong? If yes, how to do it correctly.

serial007
  • 59
  • 6

1 Answers1

1

Fatal: Failed to load the private key: unexpected EOF

If you are getting that error from my experience it could be a couple of things:

Operating system end of line conflict:

Like Badr suggested, this problem sounds like it could be an operating system conflict. Sometimes if a file was created in Linux and opened in Windows, Windows can freak out that it isn't structured in the Windows format.

If this is the case, open your favourite text editor in the operating system you are using to import the key and copy the key from the original file into the text editor, then save. This will ensure your key file is saved in a format your OS won't panic about.

Error in private key:

I notice you say:

I opened a notepad, typed my private key and saved it.

Are you certain you've correctly typed your private key? Have you used this same key for other things since? There aren't any unexpected characters in the string?

Samuel Hawksby-Robinson
  • 1,720
  • 1
  • 13
  • 28