简体   繁体   中英

Azure Devops Cli Docker registry service connection fails

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.

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.jso n 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:

在此处输入图片说明


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

在此处输入图片说明

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM