title: Best practice for SSH credentials for outbound connections from Google Cloud Shell
body: <p>I have private GIT repo on Bitbucket and would like to push changes I make on Google Cloud Shell back there. </p>
  
  <p>I've enabled Bitbucket -> GCP mirroring, but that seems to be non-bi-directional, i.e.   </p>
  
  <pre><code>git push origin master
  fatal: remote error: The remote repository is a read-only mirror of https://bitbucket.org/&lt;repo_name&gt;
  </code></pre>
  
  <p>For now, I just added one more remote that points directly to Bitbucket and generated a new SSH key pair to connect:</p>
  
  <pre><code>git remote add bitbucket git@bitbucket.org:&lt;user&gt;/&lt;repo_name&gt;.git
  ssh-keygen -t rsa -b 4096 -C "name@domain.com"
  ssh-add ~/.ssh/id_rsa
  cat ~/.ssh/id_rsa.pub
  </code></pre>
  
  <p>Git push seems to work fine:</p>
  
  <pre><code>$ git push bitbucket master
  Everything up-to-date 
  </code></pre>
  
  <p>But now the question: will <code>~/.ssh</code> survive Cloud Shell VM restart? What is the best practice?</p>