Open TextEdit
Paste key into TextEdit without any extra characters or quotations
Save the file as pk.txt to your Desktop
Open Terminal, run command:
geth account import ~/Desktop/pk.txt
After successful import, delete the file from your desktop.
.\geth account import pk.txt,pk.txt放入没有0x前缀的私钥。按之前的命令重启geth进入控制台
(如:geth --testnet --rpcapi="db,eth,net,web3,personal,web3" --rpc --rpcaddr 0.0.0.0 --rpcport 8080 --rpccorsdomain "*" --verbosity 3 console --cache=4096)
,输入 personal.listAccounts 查看是否导入成功