title: Is it possible to get a metamask private key?
body: <p>I'm beginner to blockchain development, and I have a question in the polygon documentation in order to make a deployment using hradhat, you need to pass account: process.env.PRIVATE_KEY, but how do I get the user's private key when logging in to the metamask on the site?</p>
  <pre><code>require('dotenv').config();
  require(&quot;@nomiclabs/hardhat-ethers&quot;);
  require(&quot;@nomiclabs/hardhat-etherscan&quot;);
  
  
      module.exports = {
        defaultNetwork: &quot;matic&quot;,
        networks: {
          hardhat: {
          },
          matic: {
            url: &quot;https://rpc-mumbai.maticvigil.com&quot;,
            accounts: [process.env.PRIVATE_KEY]
          }
        },
        etherscan: {
          apiKey: process.env.POLYGONSCAN_API_KEY
        },
        solidity: {
          version: &quot;0.7.0&quot;,
          settings: {
            optimizer: {
              enabled: true,
              runs: 200
            }
          }
        },
      }
  
  </code></pre>