title: How to Export certificate key to PEM format?
body: <p>My keystore is deleted, and I try to chat with Google playstore developer and I ask that my keystore app be reset, then they sent instructions like this:</p>
  
  <blockquote>
    <p>Alternatively, you can use the following command line to generate a
    new key:</p>
  
  <pre><code>keytool -genkeypair -alias upload -keyalg RSA -keysize 2048 -validity 9125 -keystore keystore.jks
  </code></pre>
    
    <p>This key must be a 2048 bit RSA key and have 25-year validity.</p>
    
    <p>Export the certificate for that key to PEM format:</p>
  
  <pre><code>keytool -export -rfc -alias upload -file upload_certificate.pem -keystore keystore.jks
  </code></pre>
    
    <p>Reply to this email and attach the upload_certificate.pem file.</p>
  </blockquote>
  
  <p>My question is how to Export the certificate for that key to PEM format?</p>
  
  <p>I try to using keytool.exe in folder C:\Program Files\Android\Android Studio\jre\bin the command prompt keytool.exe can not been write (force close)</p>