Generating a Temporary Login Command
Function
Generate a temporary login command using the value of X-Swr-Dockerlogin in the response header and the value of host in the response body.
URI
POST /v2/manage/utils/secret?projectname={projectname}
For details about parameters, see Table 1.
Request
N/A
Response
Response parameters
| Parameter | Type | Description |
|---|---|---|
| X-Swr-Dockerlogin | String | A login command, for example, docker login -u cn-north-1@OW******FPUKBXI -p 6f0779072******863d1ae3ccef921b7f33 |
| Parameter | Type | Description |
|---|---|---|
| auths | Map<String, authInfo> | Authentication information |
| Parameter | Type | Description |
|---|---|---|
| auth | String | Base64-encoded authentication information |
Response example
{
"auths": {
"10.95.181.176:5300": {
"auth": "Y24tbm9ydGg******hhMTgzMGVmN2RhZjJm"
}
}
} A temporary login command can be generated using the value of X-Swr-Dockerlogin in the response header and the value of host in the response body.
For example, in the preceding response example, the value of X-Swr-Dockerlogin in the response header is docker login -u cn-north-1@OW******FPUKBXI -p 6f0779072******863d1ae3ccef921b7f33. The value of host in the response body is 10.95.181.176:5300. Therefore, the generated temporary login command is as follows:
docker login -u cn-north-1@OW******FPUKBXI -p 6f0779072******863d1ae3ccef921b7f33 10.95.181.176:5300
Status Code
For details about status code, see Table 5.
Last Article: Deleting the Image with a Specified Tag
Next Article: Creating an Account Used for Image Sharing
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.