Deploy a project from Gitlab to Azure

  • Go to Advanced Tools -> click go and add /api/sshkey?ensurePublicKey=1 to the URL. You should get  a page starting with:
"ssh-rsa
  • Copy the whole content of the page except for the quotes “
  • Add a key in Gitlab inĀ  reposity -> deploy keys
  • Enter a descriptive title (only used in Gitlab to know which key belongs to which environment)
  • Paste the key just copied into the key field;
  • Add the website through the Deployment Center as you would normally do.

Done.

If you have multiple projects to get in one webapp you could use Deploy Tokens with an auth.json in the deployed directory:

{
    "gitlab-token": {
        "gitlab.com": "<key here>"
    }
}

(don’t forget to change the virtual path of the website)