title: The requested URL returned error: 502 when running git clone inside a Docker container
body: <p>I have a simple bash script <code>git clone https://x-token-auth:$REPOSITORY_OAUTH_ACCESS_TOKEN@bitbucket.org/danechitoaie/open-pipelines-test1.git $BUILD_DIR</code> that I run in a Docker container and the problem is that sometimes git clone fails with following error message <code>fatal: unable to access 'https://x-token-auth:$REPOSITORY_OAUTH_ACCESS_TOKEN@bitbucket.org/danechitoaie/open-pipelines-test1.git/': The requested URL returned error: 502</code></p>
  
  <p>This happens randomly, so sometimes it works sometimes I get this error. </p>
  
  <p>Any idea what could the problem be?</p>