<p>I have a YAML file that I use to create a Deployment in Kubernetes which includes:</p>

<pre><code>    volumeMounts:
    - name: git-volume
      mountPath: /code
  volumes:
  - name: git-volume
    gitRepo:
      repository: "git@bitbucket.org:organization/bot.git"
      revision: "b686122a44aa271117b602e4eba4cc02f5e56044"
</code></pre>

<p>I have a public Bitbucket Git repo (I can view it without logging in to Bitbucket).</p>

<p>I get this error when starting the Deployment in Kubernetes:</p>

<pre><code>failed to exec 'git clone git@bitbucket.org:organization/bot.git': Cloning into 'bot'... Could not create directory '/root/.ssh'.
 Failed to add the host to the list of known hosts (/root/.ssh/known_hosts).
 Permission denied (publickey).
 fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. : exit status 128
</code></pre>

<p>How can I get this repo to clone?</p>

<p>Solution is to switch to HTTPS instead of SSH (available in the dropdown in the top-right section of Bitbucket).</p>

<p>Ie: </p>

<p><a href="https://organization@bitbucket.org/organization/bot.git" rel="nofollow noreferrer">https://organization@bitbucket.org/organization/bot.git</a></p>
