Search code examples
azureazure-repos

Azure PAT or SSH not linked to a specific person?


We have a Generator that generates and pushes code to one of our local Git Repositories with a specific AD account.

Is there a way to push to Azure Repos without having to use a PAT/SSH key linked to a person? Because if that person leaves the company for instance, we have to replace the PAT/SSH keys... We would like to have a solution that is not specific to one person.


Solution

  • Azure DevOps does not allow anonymous pushes into a repository. All of the major Git providers that I'm aware of do this as well for the obvious security reasons.

    Your ask is not that uncommon, but at present, there is only one way to achieve this. You basically need to create a user in Azure DevOps that will essentially be a service account. You will want to safely store those credentials and restrict who has access to them. From there, you'll be to create personal access tokens (PAT) or SSH keys as needed for your automation process.

    It's worth noting that you will have to pay for a license for the service account.

    Similar question/answer can be found here: Is there "Service Account User" concept in AzureDevOps