Skip to content

Latest commit

 

History

History
112 lines (74 loc) · 3.12 KB

File metadata and controls

112 lines (74 loc) · 3.12 KB

Azure DevOps

Suite of DevOps related tools including repository management, CI/CD using a yaml config file etc.

Azure DevOps Pipelines

Azure DevOps Pipelines is the CI/CD in the Azure DevOps suite.

It is the Azure equivalent to GitHub Actions, GitLab CI and Bitbucket Pipelines.

You can see a summary of keys points and comparisons to the other CI/CD systems on the CI/CD page.

Azure DevOps Profile

You can check your Azure DevOps profile here:

https://aex.dev.azure.com/me

SSH Keys

Use an SSH Key to do an SSH-based git push/pull.

Add your SSH key at the top right of the screen -> User Settings -> SSH Public Keys which should take you to a URL like this ending in /_userSettings/keys:

https://dev.azure.com/<YOUR_USERNAME>/_usersSettings/keys

eg.

https://dev.azure.com/harisekhon/_usersSettings/keys

API Tokens

Use API tokens to interact programmatically with Azure DevOps or to do HTTPS git push/pull to bypass egress firewall restrictions.

Create an API token at the top right of the screen -> User Settings -> Personal access tokens which should take you to a URL like this ending in /_userSettings/tokens:

https://dev.azure.com/<YOUR_USERNAME>/_usersSettings/tokens

https://dev.azure.com/harisekhon/_usersSettings/tokens

Git Clone over HTTPS using API Token

Cloning with HTTPS then becomes:

git clone "https://$AZURE_DEVOPS_TOKEN@dev.azure.com/$USER/$PROJECT/_git/$REPO"

or better using a credential helper...

Credential Helper

Taken from my .gitconfig:

[credential "https://dev.azure.com"]
    helper = "!f() { sleep 1; echo \"username=${AZURE_DEVOPS_USER}\"; echo \"password=${AZURE_DEVOPS_TOKEN}\"; }; f"
git clone "https://dev.azure.com/$USER/$PROJECT/_git/$REPO"

If you get a 401 or 403 authentication or authorization error, you can check Git debug output by setting:

export GIT_CURL_VERBOSE=1

Azure DevOps CLI

az devops configure --defaults organization=https://dev.azure.com/harisekhon
Preview version of extension is disabled by default for extension installation, enabled for modules without stable versions.
Please run 'az config set extension.dynamic_install_allow_preview=true or false' to config it specifically.
The command requires the extension azure-devops. Do you want to install it now? The command will continue to run after the extension is installed. (Y/n):
Run 'az config set extension.use_dynamic_install=yes_without_prompt' to allow installing extensions without prompt.
az devops login
Token:
az devops user show