Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Docker@v2 push to ghcr fails (access denied) #20625

Open
4 of 7 tasks
osirisguitar opened this issue Nov 6, 2024 · 0 comments
Open
4 of 7 tasks

[BUG]: Docker@v2 push to ghcr fails (access denied) #20625

osirisguitar opened this issue Nov 6, 2024 · 0 comments

Comments

@osirisguitar
Copy link

osirisguitar commented Nov 6, 2024

New issue checklist

Task name

Docker

Task version

v2

Issue Description

Docker@v2 push fails to push image to ghcr.io. Login to ghcr works with the same service connection. The same pipeline works without problems with a service connection to Docker Hub. The PAT used in the ghcr service connection works when pushing from a command line. Tried pushing to repo-less package, package connected to a repo, and multiple organizations including one where I am admin. PAT has write:packages access rights.

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

ubuntu-latest

Relevant log output

2024-11-06T07:18:53.0808892Z ##[section]Starting: Push an image
2024-11-06T07:18:53.0925163Z ==============================================================================
2024-11-06T07:18:53.0925377Z Task : Docker
2024-11-06T07:18:53.0925500Z Description : Build or push Docker images, login or logout, start or stop containers, or run a Docker command
2024-11-06T07:18:53.0925696Z Version : 2.247.1
2024-11-06T07:18:53.0925823Z Author : Microsoft Corporation
2024-11-06T07:18:53.0925953Z Help : https://aka.ms/azpipes-docker-tsg
2024-11-06T07:18:53.0926081Z ==============================================================================
2024-11-06T07:18:53.5893993Z [command]/usr/bin/docker images
2024-11-06T07:18:53.5899885Z [command]/usr/bin/docker push ghcr.io/my-github-org/my-repo:test1-3537
2024-11-06T07:18:53.5900257Z REPOSITORY TAG IMAGE ID CREATED SIZE
2024-11-06T07:18:53.5900743Z ghcr.io/my-github-org/my-repo test1-3537 31640713a079 2 seconds ago 301MB
2024-11-06T07:18:53.5901271Z mcr.microsoft.com/dotnet/aspnet 6.0 c2be2e531fc8 2 weeks ago 209MB
2024-11-06T07:18:53.5901616Z ubuntu 20.04 6013ae1a63c2 3 weeks ago 72.8MB
2024-11-06T07:18:53.5902063Z node 20-alpine 63ac15de6a47 4 weeks ago 133MB
2024-11-06T07:18:53.5902385Z node 20 ef970e331526 4 weeks ago 1.1GB
2024-11-06T07:18:53.5902707Z debian 11 fd320476a1f2 5 weeks ago 124MB
2024-11-06T07:18:53.5903019Z ubuntu 22.04 97271d29cb79 7 weeks ago 77.9MB
2024-11-06T07:18:53.5903339Z moby/buildkit latest 2a89c2764aad 8 weeks ago 202MB
2024-11-06T07:18:53.5903667Z alpine 3.17 2fb3b1200892 2 months ago 7.08MB
2024-11-06T07:18:53.5903998Z alpine 3.18 2c64cf60f6f0 2 months ago 7.35MB
2024-11-06T07:18:53.5904315Z alpine 3.19 a57d33a5c507 2 months ago 7.39MB
2024-11-06T07:18:53.5904756Z node 18-alpine f48cc5826852 4 months ago 128MB
2024-11-06T07:18:53.5905072Z node 18 2e348d98bd63 4 months ago 1.09GB
2024-11-06T07:18:53.5905383Z debian 10 69530eaa9e7e 4 months ago 115MB
2024-11-06T07:18:53.5905720Z alpine 3.16 d49a5025be10 9 months ago 5.54MB
2024-11-06T07:18:53.5906109Z node 16 1ddc7e4055fd 14 months ago 909MB
2024-11-06T07:18:53.5906556Z node 16-alpine 2573171e0124 15 months ago 118MB
2024-11-06T07:18:53.5906687Z
2024-11-06T07:18:53.5923641Z The push refers to repository [ghcr.io/my-github-org/my-repo]
2024-11-06T07:18:53.6754212Z ead24dff829c: Preparing
2024-11-06T07:18:53.6754669Z 5f70bf18a086: Preparing
2024-11-06T07:18:53.6754950Z bff24fa5ba6d: Preparing
2024-11-06T07:18:53.6755208Z 734661639d51: Preparing
2024-11-06T07:18:53.6755464Z 008aac071916: Preparing
2024-11-06T07:18:53.6755784Z 261abc8281b7: Preparing
2024-11-06T07:18:53.6756033Z 7794e8d8212d: Preparing
2024-11-06T07:18:53.6756282Z ceffe60ed721: Preparing
2024-11-06T07:18:53.6756529Z 261abc8281b7: Waiting
2024-11-06T07:18:53.6756777Z 7794e8d8212d: Waiting
2024-11-06T07:18:53.6757020Z ceffe60ed721: Waiting
2024-11-06T07:18:53.8064164Z denied: denied
2024-11-06T07:18:53.8071559Z
2024-11-06T07:18:53.8100848Z ##[error]denied: denied
2024-11-06T07:18:53.8205302Z ##[error]The process '/usr/bin/docker' failed with exit code 1
2024-11-06T07:18:53.8277688Z ##[section]Finishing: Push an image

Full task logs with system.debug enabled

2024-11-06T07:22:29.6267636Z ##[debug]Evaluating condition for step: 'Push an image'
2024-11-06T07:22:29.6269442Z ##[debug]Evaluating: SucceededNode()
2024-11-06T07:22:29.6269931Z ##[debug]Evaluating SucceededNode:
2024-11-06T07:22:29.6270952Z ##[debug]=> True
2024-11-06T07:22:29.6271504Z ##[debug]Result: True
2024-11-06T07:22:29.6271906Z ##[section]Starting: Push an image
2024-11-06T07:22:29.6279947Z ==============================================================================
2024-11-06T07:22:29.6280128Z Task         : Docker
2024-11-06T07:22:29.6280246Z Description  : Build or push Docker images, login or logout, start or stop containers, or run a Docker command
2024-11-06T07:22:29.6280411Z Version      : 2.247.1
2024-11-06T07:22:29.6280512Z Author       : Microsoft Corporation
2024-11-06T07:22:29.6280652Z Help         : https://aka.ms/azpipes-docker-tsg
2024-11-06T07:22:29.6280759Z ==============================================================================
2024-11-06T07:22:29.7672754Z ##[debug]Using node path: /home/vsts/agents/3.246.0/externals/node20_1/bin/node
2024-11-06T07:22:29.8659919Z ##[debug]agent.TempDirectory=/home/vsts/work/_temp
2024-11-06T07:22:29.8669069Z ##[debug]loading inputs and endpoints
2024-11-06T07:22:29.8679689Z ##[debug]loading INPUT_CONTAINERREGISTRY
2024-11-06T07:22:29.8704446Z ##[debug]loading INPUT_REPOSITORY
2024-11-06T07:22:29.8706385Z ##[debug]loading INPUT_COMMAND
2024-11-06T07:22:29.8708461Z ##[debug]loading INPUT_DOCKERFILE
2024-11-06T07:22:29.8710369Z ##[debug]loading INPUT_BUILDCONTEXT
2024-11-06T07:22:29.8712302Z ##[debug]loading INPUT_TAGS
2024-11-06T07:22:29.8714229Z ##[debug]loading INPUT_ADDPIPELINEDATA
2024-11-06T07:22:29.8717701Z ##[debug]loading INPUT_ADDBASEIMAGEDATA
2024-11-06T07:22:29.8720113Z ##[debug]loading ENDPOINT_AUTH_dd2df2bf-2db1-4ab3-b111-3d99525ae98e
2024-11-06T07:22:29.8723418Z ##[debug]loading ENDPOINT_AUTH_SCHEME_dd2df2bf-2db1-4ab3-b111-3d99525ae98e
2024-11-06T07:22:29.8727330Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_dd2df2bf-2db1-4ab3-b111-3d99525ae98e_REGISTRY
2024-11-06T07:22:29.8732392Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_dd2df2bf-2db1-4ab3-b111-3d99525ae98e_USERNAME
2024-11-06T07:22:29.8735264Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_dd2df2bf-2db1-4ab3-b111-3d99525ae98e_EMAIL
2024-11-06T07:22:29.8738162Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_dd2df2bf-2db1-4ab3-b111-3d99525ae98e_PASSWORD
2024-11-06T07:22:29.8740306Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2024-11-06T07:22:29.8742834Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2024-11-06T07:22:29.8744740Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2024-11-06T07:22:29.8754256Z ##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
2024-11-06T07:22:29.8756486Z ##[debug]loading SECRET_CONTAINER_AUTHENTICATIONTOKEN
2024-11-06T07:22:29.8758550Z ##[debug]loaded 19
2024-11-06T07:22:29.8765172Z ##[debug]Agent.ProxyUrl=undefined
2024-11-06T07:22:29.8766597Z ##[debug]Agent.CAInfo=undefined
2024-11-06T07:22:29.8767766Z ##[debug]Agent.ClientCert=undefined
2024-11-06T07:22:29.8770290Z ##[debug]Agent.SkipCertValidation=undefined
2024-11-06T07:22:29.8912213Z ##[debug]check path : /home/vsts/work/_tasks/Docker_e28912f1-0114-4464-802a-a3a35437fd16/2.247.1/node_modules/azure-pipelines-tasks-docker-common/module.json
2024-11-06T07:22:29.8918734Z ##[debug]adding resource file: /home/vsts/work/_tasks/Docker_e28912f1-0114-4464-802a-a3a35437fd16/2.247.1/node_modules/azure-pipelines-tasks-docker-common/module.json
2024-11-06T07:22:29.8921311Z ##[debug]system.culture=en-US
2024-11-06T07:22:29.8944031Z ##[debug]Resource file has already set to: /home/vsts/work/_tasks/Docker_e28912f1-0114-4464-802a-a3a35437fd16/2.247.1/node_modules/azure-pipelines-tasks-docker-common/module.json
2024-11-06T07:22:29.9255270Z ##[debug]agent.proxyurl=undefined
2024-11-06T07:22:29.9255863Z ##[debug]VSTS_ARM_REST_IGNORE_SSL_ERRORS=undefined
2024-11-06T07:22:29.9256422Z ##[debug]AZURE_HTTP_USER_AGENT=VSTS_ae207394-b3fe-4e9a-aa85-1c32ebf32435_build_134_0
2024-11-06T07:22:30.1014820Z ##[debug]Using msalv2
2024-11-06T07:22:30.1491496Z ##[debug]check path : /home/vsts/work/_tasks/Docker_e28912f1-0114-4464-802a-a3a35437fd16/2.247.1/node_modules/azure-pipelines-tasks-azure-arm-rest/module.json
2024-11-06T07:22:30.1494989Z ##[debug]adding resource file: /home/vsts/work/_tasks/Docker_e28912f1-0114-4464-802a-a3a35437fd16/2.247.1/node_modules/azure-pipelines-tasks-azure-arm-rest/module.json
2024-11-06T07:22:30.1498692Z ##[debug]system.culture=en-US
2024-11-06T07:22:30.1519417Z ##[debug]Agent.TempDirectory=/home/vsts/work/_temp
2024-11-06T07:22:30.1523857Z ##[debug]Resource file has already set to: /home/vsts/work/_tasks/Docker_e28912f1-0114-4464-802a-a3a35437fd16/2.247.1/node_modules/azure-pipelines-tasks-azure-arm-rest/module.json
2024-11-06T07:22:30.1543499Z ##[debug]check path : /home/vsts/work/_tasks/Docker_e28912f1-0114-4464-802a-a3a35437fd16/2.247.1/task.json
2024-11-06T07:22:30.1546303Z ##[debug]adding resource file: /home/vsts/work/_tasks/Docker_e28912f1-0114-4464-802a-a3a35437fd16/2.247.1/task.json
2024-11-06T07:22:30.1547205Z ##[debug]system.culture=en-US
2024-11-06T07:22:30.1559991Z ##[debug]containerRegistry=dd2df2bf-2db1-4ab3-b111-3d99525ae98e
2024-11-06T07:22:30.1563952Z ##[debug]dd2df2bf-2db1-4ab3-b111-3d99525ae98e data registrytype = Others
2024-11-06T07:22:30.1567304Z ##[debug]dd2df2bf-2db1-4ab3-b111-3d99525ae98e exists true
2024-11-06T07:22:30.1569191Z ##[debug]System.ServerType=Hosted
2024-11-06T07:22:30.1576280Z ##[debug]command=push
2024-11-06T07:22:30.1579511Z ##[debug]which 'docker'
2024-11-06T07:22:30.1586575Z ##[debug]found: '/usr/bin/docker'
2024-11-06T07:22:30.1589631Z ##[debug]DOCKER_CONFIG=
2024-11-06T07:22:30.1600935Z ##[debug]Processed: ##vso[task.setvariable variable=CONTAINER_AUTHENTICATIONTOKEN;issecret=true;]***
2024-11-06T07:22:30.1603386Z ##[debug]agent.tempDirectory=/home/vsts/work/_temp
2024-11-06T07:22:30.1607766Z ##[debug]testing directory '/home/vsts/work/_temp/DockerConfig_1730877750160/trust/private'
2024-11-06T07:22:30.1608579Z ##[debug]testing directory '/home/vsts/work/_temp/DockerConfig_1730877750160/trust'
2024-11-06T07:22:30.1609340Z ##[debug]testing directory '/home/vsts/work/_temp/DockerConfig_1730877750160'
2024-11-06T07:22:30.1610091Z ##[debug]mkdir '/home/vsts/work/_temp/DockerConfig_1730877750160/trust'
2024-11-06T07:22:30.1611723Z ##[debug]mkdir '/home/vsts/work/_temp/DockerConfig_1730877750160/trust/private'
2024-11-06T07:22:30.1612594Z ##[debug]Writing Docker config to temp file. File path: /home/vsts/work/_temp/DockerConfig_1730877750160/config.json, Docker config: {"auths": { "***": {"auth": "***", "email": "***" } }, "HttpHeaders":{"X-Meta-Source-Client":"VSTS"} }
2024-11-06T07:22:30.1628729Z ##[debug]Synced the file content to the disk. The content is {"auths": { "***": {"auth": "***", "email": "***" } }, "HttpHeaders":{"X-Meta-Source-Client":"VSTS"} }.
2024-11-06T07:22:30.1630184Z ##[debug]Attempting to get endpoint authorization scheme...
2024-11-06T07:22:30.1635505Z ##[debug]dd2df2bf-2db1-4ab3-b111-3d99525ae98e auth scheme = UsernamePassword
2024-11-06T07:22:30.1636085Z ##[debug]SYSTEM_JOBID=f44c105f-7f58-5be0-52fe-9fb2fbba1751
2024-11-06T07:22:30.1944314Z ##[debug]Processed: ##vso[telemetry.publish area=TaskEndpointId;feature=DockerV2]{"command":"push","jobId":"f44c105f-7f58-5be0-52fe-9fb2fbba1751","scheme":"UsernamePassword"}
2024-11-06T07:22:30.1986544Z ##[debug]System.TeamFoundationCollectionUri=https://dev.azure.com/myaccount/
2024-11-06T07:22:30.1987151Z ##[debug]System.HostType=build
2024-11-06T07:22:30.1987639Z ##[debug]agent.proxyurl=undefined
2024-11-06T07:22:30.1988144Z ##[debug]VSTS_ARM_REST_IGNORE_SSL_ERRORS=undefined
2024-11-06T07:22:30.1988691Z ##[debug]AZURE_HTTP_USER_AGENT=VSTS_ae207394-b3fe-4e9a-aa85-1c32ebf32435_build_134_0
2024-11-06T07:22:30.1989217Z ##[debug]which '/usr/bin/docker'
2024-11-06T07:22:30.1989695Z ##[debug]found: '/usr/bin/docker'
2024-11-06T07:22:30.1990188Z ##[debug]/usr/bin/docker arg: images
2024-11-06T07:22:30.1990666Z ##[debug]DOCKER_HOST=undefined
2024-11-06T07:22:30.1991143Z ##[debug]exec tool: /usr/bin/docker
2024-11-06T07:22:30.1991683Z ##[debug]arguments:
2024-11-06T07:22:30.1992609Z ##[debug]   images
2024-11-06T07:22:30.1993025Z [command]/usr/bin/docker images
2024-11-06T07:22:30.1993433Z ##[debug]arguments=undefined
2024-11-06T07:22:30.1993898Z ##[debug]tags=test1-3538
2024-11-06T07:22:30.1994401Z ##[debug]repository=/my-repo
2024-11-06T07:22:30.1995267Z ##[debug]containerRegistry=dd2df2bf-2db1-4ab3-b111-3d99525ae98e
2024-11-06T07:22:30.1995877Z ##[debug]dockerFile=/home/vsts/work/1/s/**/Dockerfile
2024-11-06T07:22:30.1996467Z ##[debug]Pushing ImageNameWithTag: ghcr.io//my-repo:test1-3538
2024-11-06T07:22:30.1997010Z ##[debug]which '/usr/bin/docker'
2024-11-06T07:22:30.1997791Z ##[debug]found: '/usr/bin/docker'
2024-11-06T07:22:30.1998557Z ##[debug]/usr/bin/docker arg: push
2024-11-06T07:22:30.1999293Z ##[debug]/usr/bin/docker arg: ghcr.io//my-repo:test1-3538
2024-11-06T07:22:30.2014843Z ##[debug]DOCKER_HOST=undefined
2024-11-06T07:22:30.2015562Z ##[debug]exec tool: /usr/bin/docker
2024-11-06T07:22:30.2016191Z ##[debug]arguments:
2024-11-06T07:22:30.2016649Z ##[debug]   push
2024-11-06T07:22:30.2017156Z ##[debug]   ghcr.io//my-repo:test1-3538
2024-11-06T07:22:30.2017934Z [command]/usr/bin/docker push ghcr.io//my-repo:test1-3538
2024-11-06T07:22:30.2088377Z REPOSITORY                                 TAG          IMAGE ID       CREATED         SIZE
2024-11-06T07:22:30.2089077Z ghcr.io//my-repo   test1-3538   615d4416c510   2 seconds ago   301MB
2024-11-06T07:22:30.2096058Z mcr.microsoft.com/dotnet/aspnet            6.0          c2be2e531fc8   2 weeks ago     209MB
2024-11-06T07:22:30.2096394Z ubuntu                                     20.04        6013ae1a63c2   3 weeks ago     72.8MB
2024-11-06T07:22:30.2096691Z node                                       20           ef970e331526   4 weeks ago     1.1GB
2024-11-06T07:22:30.2097528Z node                                       20-alpine    63ac15de6a47   4 weeks ago     133MB
2024-11-06T07:22:30.2097840Z debian                                     11           fd320476a1f2   5 weeks ago     124MB
2024-11-06T07:22:30.2098502Z ubuntu                                     22.04        97271d29cb79   7 weeks ago     77.9MB
2024-11-06T07:22:30.2098803Z moby/buildkit                              latest       2a89c2764aad   8 weeks ago     202MB
2024-11-06T07:22:30.2099091Z alpine                                     3.17         2fb3b1200892   2 months ago    7.08MB
2024-11-06T07:22:30.2099373Z alpine                                     3.18         2c64cf60f6f0   2 months ago    7.35MB
2024-11-06T07:22:30.2099698Z alpine                                     3.19         a57d33a5c507   2 months ago    7.39MB
2024-11-06T07:22:30.2100112Z node                                       18-alpine    f48cc5826852   4 months ago    128MB
2024-11-06T07:22:30.2100391Z node                                       18           2e348d98bd63   4 months ago    1.09GB
2024-11-06T07:22:30.2100716Z debian                                     10           69530eaa9e7e   4 months ago    115MB
2024-11-06T07:22:30.2100992Z alpine                                     3.16         d49a5025be10   9 months ago    5.54MB
2024-11-06T07:22:30.2101789Z node                                       16           1ddc7e4055fd   14 months ago   909MB
2024-11-06T07:22:30.2102216Z node                                       16-alpine    2573171e0124   15 months ago   118MB
2024-11-06T07:22:30.2126315Z 
2024-11-06T07:22:30.2135225Z ##[debug]Exit code 0 received from tool '/usr/bin/docker'
2024-11-06T07:22:30.2137572Z ##[debug]STDIO streams have closed for tool '/usr/bin/docker'
2024-11-06T07:22:30.2654470Z The push refers to repository [ghcr.io//my-repo]
2024-11-06T07:22:30.3490380Z 0ed3a6e33f2d: Preparing
2024-11-06T07:22:30.3491757Z 5f70bf18a086: Preparing
2024-11-06T07:22:30.3538989Z 79f761c5e23f: Preparing
2024-11-06T07:22:30.3539248Z 734661639d51: Preparing
2024-11-06T07:22:30.3539469Z 008aac071916: Preparing
2024-11-06T07:22:30.3540042Z 261abc8281b7: Preparing
2024-11-06T07:22:30.3540270Z 7794e8d8212d: Preparing
2024-11-06T07:22:30.3540488Z ceffe60ed721: Preparing
2024-11-06T07:22:30.3540713Z 261abc8281b7: Waiting
2024-11-06T07:22:30.3540934Z 7794e8d8212d: Waiting
2024-11-06T07:22:30.3541191Z ceffe60ed721: Waiting
2024-11-06T07:22:30.4700157Z denied: denied
2024-11-06T07:22:30.4712867Z 
2024-11-06T07:22:30.4718805Z ##[debug]Exit code 1 received from tool '/usr/bin/docker'
2024-11-06T07:22:30.4721832Z ##[debug]STDIO streams have closed for tool '/usr/bin/docker'
2024-11-06T07:22:30.4732761Z ##[error]denied: denied
2024-11-06T07:22:30.4733817Z ##[debug]Processed: ##vso[task.issue type=error;source=TaskInternal;correlationId=e8ae2c22-76a1-4087-a25e-4a16d14f30b6;]denied: denied
2024-11-06T07:22:30.4736590Z ##[debug]Trying to logout from registry: ***
2024-11-06T07:22:30.4737461Z ##[debug]DOCKER_CONFIG=/home/vsts/work/_temp/DockerConfig_1730877750160
2024-11-06T07:22:30.4739330Z ##[debug]agent.tempDirectory=/home/vsts/work/_temp
2024-11-06T07:22:30.4742266Z ##[debug]Found the Docker Config stored in the temp path. Docker config path: /home/vsts/work/_temp/DockerConfig_1730877750160/config.json, Docker config: {"auths": { "***": {"auth": "***", "email": "***" } }, "HttpHeaders":{"X-Meta-Source-Client":"VSTS"} }
2024-11-06T07:22:30.4743719Z ##[debug]Deleting Docker config directory. Path: /home/vsts/work/_temp/DockerConfig_1730877750160/config.json
2024-11-06T07:22:30.4744742Z ##[debug]DOCKER_CONFIG=/home/vsts/work/_temp/DockerConfig_1730877750160
2024-11-06T07:22:30.4746180Z ##[debug]agent.tempDirectory=/home/vsts/work/_temp
2024-11-06T07:22:30.4747026Z ##[debug]Deleting Docker config directory. Path: /home/vsts/work/_temp/DockerConfig_1730877750160
2024-11-06T07:22:30.4854225Z ##[debug]set DOCKER_CONFIG=
2024-11-06T07:22:30.4855249Z ##[debug]Processed: ##vso[task.setvariable variable=DOCKER_CONFIG;isOutput=false;issecret=false;]
2024-11-06T07:22:30.4855810Z ##[debug]task result: Failed
2024-11-06T07:22:30.4856707Z ##[error]The process '/usr/bin/docker' failed with exit code 1
2024-11-06T07:22:30.4857511Z ##[debug]Processed: ##vso[task.issue type=error;source=TaskInternal;correlationId=e8ae2c22-76a1-4087-a25e-4a16d14f30b6;]The process '/usr/bin/docker' failed with exit code 1
2024-11-06T07:22:30.4874971Z ##[debug]Processed: ##vso[task.complete result=Failed;]The process '/usr/bin/docker' failed with exit code 1
2024-11-06T07:22:30.4946979Z ##[section]Finishing: Push an image

Repro steps

# Docker
# Build a Docker image
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker

pr:
  branches:
    include:
      - feat/k8s-test-env

trigger:
  branches:
    include:
      - feat/k8s-test-env

resources:
  - repo: self

variables:
  tag: "$(Build.BuildId)"

stages:
  - stage: BuildandPush
    displayName: Build image and push to ghcr.io
    jobs:
      - job: Build
        displayName: Build
        pool:
          vmImage: ubuntu-latest
        steps:
          - task: Docker@2
            displayName: Build an image
            inputs:
              command: build
              dockerfile: "**/Dockerfile"
              containerRegistry: ghcr-io
              repository: my-github-organization/my-repo
              tags: |
                test1$(tag)
          - task: Docker@2
            displayName: Push an image
            inputs:
              command: push
              containerRegistry: ghcr-io
              repository: my-github-organization/my-repo
              tags: |
                test1-$(tag)

My service connection for ghcr:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant