eos icon indicating copy to clipboard operation
eos copied to clipboard

Importing the eosio private key

Open ekkis opened this issue 8 years ago • 7 comments

in the page: https://github.com/EOSIO/eos/wiki/Tutorial-Getting-Started-With-Contracts it is stated that I need to import the eosio private key into my wallet. the private key is said to exist in the config.ini but when I look there what I see is an array of values:

# Tuple of [public key, WIF private key] (may specify multiple times) (eosio::producer_plugin)
private-key = ["EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]

and if I try to import the private key (first element), the process pukes:

ekkis@ubuntu:~/eos$ cleos wallet import EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV

Error 3120003: Invalid private key Private key should be encoded in base58 WIF Error Details: Invalid private key: EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV

if I attempt to import the second value it claims the key is already in my wallet (but I never imported it as I just built the daemon)

please help (and let's please fix the docs)

ekkis avatar May 04 '18 00:05 ekkis

I think private key is the second and that key is imported by default. You can check with cleos wallet keys

giniz avatar May 04 '18 01:05 giniz

Ya, the confused me initially also. When you create a new wallet it auto adds that key to your wallet, you don't need to add it yourself.

BinaryFocus avatar May 04 '18 02:05 BinaryFocus

Yes, we can pull that step out of the documentation.

rbw3821 avatar May 04 '18 20:05 rbw3821

The instructions to use cleos to import the eosio private key are no longer needed because that key is now imported automatically. Those instructions have been removed from the tutorial.

rbw3821 avatar May 05 '18 20:05 rbw3821

Error 3010003: Invalid private key Private key should be encoded in base58 WIF

cczufish avatar Jun 11 '18 07:06 cczufish

I just repeated the Getting Started tutorial and did not encounter the problem you stated. I then copied the import line out of the tutorial and deliberately left off the last character, then I received the error that you saw. Check and make sure you've copied the line in its entirety.

rbw3821 avatar Jun 12 '18 14:06 rbw3821

the tutorial has become deprecated. in fact, they've deprecated support for Docker altogether. truly sad. but in any case, the eosio private key does not get automatically added to the node. I'm running the latest version from the brew binaries and I still have to add the key myself

ekkis avatar Jan 17 '19 21:01 ekkis