0
votes

I am try to create Service Connection for Docker Registry in Azure Devops using Azure Cli. I could create the service connection but it is not accepting the password passed via config.json file.

1

1 Answers

1
votes

Since you did not share your config.json here, I would share you mine that is work fine on my side:

{
  "id": "06111f22-xxx-fba560f7d470",
  "description": "",
  "administratorsGroup": null,
  "authorization": {
    "parameters": {
      "username": "xxxx",
      "password": "xxxxxx",
      "email": "",
      "registry": "https://index.docker.io/v1/"
    },
    "scheme": "UsernamePassword"
  },
  "createdBy": null,
  "data": {
    "registrytype": "DockerHub"
  },
  "name": "Dockerhub",
  "type": "dockerregistry",
  "url": "https://hub.docker.com/",
  "readersGroup": null,
  "groupScopeId": null,
  "serviceEndpointProjectReferences": null,
  "operationStatus": null
}

In this config.json file, the password must be the clear text. After created, you can go UI, then click on Verify this connection to see whether it is created succeed:

enter image description here


For the command output which displayed after you create the service connection via cli:

enter image description here

You can ignore this null output, which is actually the output we set to protect the user's privacy data from being intercepted and parsed, which will cause data theft. This is as design by us.

In fact, the password has stored in the backend database in the background after you create it. It is just represented as null in the data interaction with the frontend. Just for security protected.

To confirm whether it is created successfully, you can follow the method I show above. Go UI, then click on Verify this connection to see whether it is an available service connection.