[Ethereum] Change Ganache-Cli account using the MetaMask

go-ethereummetamask

I am making a Voting Dapp, learning from the tutorial given
here

In Which all the transactions are happening from the single account but as ganache given 10 accounts, I want to change the account and perform the transaction.

Is there any way I can use MetaMask to do it ?

Best Answer

  1. Go To Profile Section -> Import Account
  2. From Ganache-Cli or Ganache Gui Copy Private KEy Of any One Account and Paste In Private Key Option menu
  3. Hit Enter And Boom You Are Done (Check You are Running On localhost :8545 if using ganache-cli and if using gui the 127.0.0.1:7545)