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

unexpected status: 401 Unauthorized #139

Closed
eduardogoncalves opened this issue Aug 26, 2019 · 4 comments
Closed

unexpected status: 401 Unauthorized #139

eduardogoncalves opened this issue Aug 26, 2019 · 4 comments

Comments

@eduardogoncalves
Copy link

I've tried several times, but buildx is failing to push to docker register.

docker buildx build --platform linux/amd64,linux/arm/v7 -t egoncalves/myapi --push .
                                                             0.0s
 => CACHED [linux/arm/v7 build-env 5/6] COPY ./ ./                                                                                                                   
                                                                                                                                                                     
                                                             0.0s                                                                                                    
 => [linux/arm/v7 build-env 6/6] RUN dotnet publish ./fsharp-webapi.fsproj  -c Release -o /app/out                                                                   
                                                                                                                19bf5cff66a9459d04f3aea23e1a7ec30f                   
                                                            14.1s                                               a23e1a7ec30f                                         
 => => # Microsoft (R) Build Engine version 16.2.32702+c4012a063 for .NET Core                                  bb14911c4038f50d35c2cc7ce34e02a062c                  
 => => # Copyright (C) Microsoft Corporation. All rights reserved.                                              cc7ce34e02a062c                                      
 => CACHED [linux/amd64 stage-1 2/3] WORKDIR /app                                                                                                                    
                                                                                                                                                                     
                                                             0.0s                                               519bf5cff66a9459d04f3aea23e1a7ec30f                  
 => CACHED [linux/amd64 build-env 2/6] WORKDIR /app                                                             a23e1a7ec30f                                         
                                                                                                                6bb14911c4038f50d35c2cc7ce34e02a062c                 
                                                             0.0s                                               cc7ce34e02a062c                                      
 => CACHED [linux/amd64 build-env 3/6] COPY ./fsharp-webapi.fsproj ./                                                                                                
                                                                                                                                                                     
                                                             0.0s                                                                                                    
 => CACHED [linux/amd64 build-env 4/6] RUN dotnet restore                                                                                                            
                                                                                                                                                                     
                                                             0.0s
 => CACHED [linux/amd64 build-env 5/6] COPY ./ ./
 => => resolve mcr.microsoft.com/dotnet/core/aspnet:2.2@sha256:c138ee33fd85cf41411a13d8156b6bb14911c4038f50d35c2                                                     cc7ce34e02a062c                                                                                                                                                      
                                                             0.0sp-webapi.fsproj  -c Release -o /app/out                                                             
 => [internal] load build context                                                                                                                                    
                                                                                                                                                                     
                                                             0.0sut/ ./                                                                                              
 => => transferring context: 376B                                                                                                                                    

                                                             0.0s
 => [linux/arm/v7 build-env 1/6] FROM mcr.microsoft.com/dotnet/core/sdk:2.2@sha256:e1b19d391986f21b177c1ba47f8a8519bf5cff66a9459d04f3aea23e1a7ec30f
                                                             0.0s
 => => resolve mcr.microsoft.com/dotnet/core/sdk:2.2@sha256:e1b19d391986f21b177c1ba47f8a8519bf5cff66a9459d04f3aea23e1a7ec30f
                                                             0.0s
 => [linux/arm/v7 stage-1 1/3] FROM mcr.microsoft.com/dotnet/core/aspnet:2.2@sha256:c138ee33fd85cf41411a13d8156b6bb14911c4038f50d35c2cc7ce34e02a062c
                                                             0.0s
 => => resolve mcr.microsoft.com/dotnet/core/aspnet:2.2@sha256:c138ee33fd85cf41411a13d8156b6bb14911c4038f50d35c2cc7ce34e02a062c
                                                             0.0s
 => CACHED [linux/arm/v7 build-env 2/6] WORKDIR /app

                                                             0.0s
 => CACHED [linux/arm/v7 build-env 3/6] COPY ./fsharp-webapi.fsproj ./

                                                             0.0s
 => CACHED [linux/arm/v7 build-env 4/6] RUN dotnet restore

                                                             0.0s
 => CACHED [linux/arm/v7 build-env 5/6] COPY ./ ./

                                                             0.0s
 => [linux/arm/v7 build-env 6/6] RUN dotnet publish ./fsharp-webapi.fsproj  -c Release -o /app/out
[+] Building 2535.4s (26/26) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                            0.0s 
 => => transferring dockerfile: 32B                                                                                                                             0.0s 
 => [internal] load .dockerignore                                                                                                                               0.0s 
 => => transferring context: 35B                                                                                                                                0.0s 
 => [linux/amd64 internal] load metadata for mcr.microsoft.com/dotnet/core/aspnet:2.2                                                                           1.0s 
 => [linux/arm/v7 internal] load metadata for mcr.microsoft.com/dotnet/core/aspnet:2.2                                                                          1.0s 
 => [linux/arm/v7 internal] load metadata for mcr.microsoft.com/dotnet/core/sdk:2.2                                                                             1.1s 
 => [linux/amd64 internal] load metadata for mcr.microsoft.com/dotnet/core/sdk:2.2                                                                              1.0s 
 => [linux/amd64 build-env 1/6] FROM mcr.microsoft.com/dotnet/core/sdk:2.2@sha256:e1b19d391986f21b177c1ba47f8a8519bf5cff66a9459d04f3aea23e1a7ec30f              0.0s 
 => => resolve mcr.microsoft.com/dotnet/core/sdk:2.2@sha256:e1b19d391986f21b177c1ba47f8a8519bf5cff66a9459d04f3aea23e1a7ec30f                                    0.0s 
 => [linux/amd64 stage-1 1/3] FROM mcr.microsoft.com/dotnet/core/aspnet:2.2@sha256:c138ee33fd85cf41411a13d8156b6bb14911c4038f50d35c2cc7ce34e02a062c             0.0s 
 => => resolve mcr.microsoft.com/dotnet/core/aspnet:2.2@sha256:c138ee33fd85cf41411a13d8156b6bb14911c4038f50d35c2cc7ce34e02a062c                                 0.0s 
 => [internal] load build context                                                                                                                               0.0s 
 => => transferring context: 376B                                                                                                                               0.0s 
 => [linux/arm/v7 build-env 1/6] FROM mcr.microsoft.com/dotnet/core/sdk:2.2@sha256:e1b19d391986f21b177c1ba47f8a8519bf5cff66a9459d04f3aea23e1a7ec30f             0.0s 
 => => resolve mcr.microsoft.com/dotnet/core/sdk:2.2@sha256:e1b19d391986f21b177c1ba47f8a8519bf5cff66a9459d04f3aea23e1a7ec30f                                    0.0s 
 => [linux/arm/v7 stage-1 1/3] FROM mcr.microsoft.com/dotnet/core/aspnet:2.2@sha256:c138ee33fd85cf41411a13d8156b6bb14911c4038f50d35c2cc7ce34e02a062c            0.0s 
 => => resolve mcr.microsoft.com/dotnet/core/aspnet:2.2@sha256:c138ee33fd85cf41411a13d8156b6bb14911c4038f50d35c2cc7ce34e02a062c                                 0.0s 
 => CACHED [linux/arm/v7 build-env 2/6] WORKDIR /app                                                                                                            0.0s 
 => CACHED [linux/arm/v7 build-env 3/6] COPY ./fsharp-webapi.fsproj ./                                                                                          0.0s 
 => CACHED [linux/arm/v7 build-env 4/6] RUN dotnet restore                                                                                                      0.0s 
 => CACHED [linux/arm/v7 build-env 5/6] COPY ./ ./                                                                                                              0.0s 
 => [linux/arm/v7 build-env 6/6] RUN dotnet publish ./fsharp-webapi.fsproj  -c Release -o /app/out                                                            113.6s 
 => CACHED [linux/amd64 stage-1 2/3] WORKDIR /app                                                                                                               0.0s 
 => CACHED [linux/amd64 build-env 2/6] WORKDIR /app                                                                                                             0.0s 
 => CACHED [linux/amd64 build-env 3/6] COPY ./fsharp-webapi.fsproj ./                                                                                           0.0s 
 => CACHED [linux/amd64 build-env 4/6] RUN dotnet restore                                                                                                       0.0s 
 => CACHED [linux/amd64 build-env 5/6] COPY ./ ./                                                                                                               0.0s 
 => CACHED [linux/amd64 build-env 6/6] RUN dotnet publish ./fsharp-webapi.fsproj  -c Release -o /app/out                                                        0.0s 
 => CACHED [linux/amd64 stage-1 3/3] COPY --from=build-env /app/out/ ./                                                                                         0.0s
 => CACHED [linux/arm/v7 stage-1 2/3] WORKDIR /app                                                                                                              0.0s 
 => [linux/arm/v7 stage-1 3/3] COPY --from=build-env /app/out/ ./                                                                                               0.1s 
 => ERROR exporting to image                                                                                                                                 2420.3s 
 => => exporting layers                                                                                                                                         2.1s 
 => => exporting manifest sha256:7aff5ee40710cc46294725d28c4f37960a6ec88dac46abcead6068d728685d51                                                               0.0s 
 => => exporting config sha256:f33d606ad42db6446c45e255e11f6d134c842f0a3057b3c9b26c7f770130beb9                                                                 0.0s 
 => => exporting manifest sha256:fe6e57398d211ce8930e04fa85dbc63c657bc12bd0431d6862e292a9f4edb626                                                               0.0s 
 => => exporting config sha256:6ba0526094c93b290d573c6046677ef2ee754011d17c7157d0695f36d39acbdb                                                                 0.0s 
 => => exporting manifest list sha256:de2d305fbdd86c60f4a1c328a6deae6991215c45cc18df39705d9196dc35f8aa                                                          0.0s 
 => => pushing layers                                                                                                                                        2416.8s 
 => => pushing manifest for docker.io/egoncalves/myapi:latest                                                                                                   1.3s 
------
 > exporting to image:
------
failed to solve: rpc error: code = Unknown desc = failed commit on ref "manifest-sha256:7aff5ee40710cc46294725d28c4f37960a6ec88dac46abcead6068d728685d51": unexpected status: 401 Unauthorized
@eduardogoncalves
Copy link
Author

eduardogoncalves commented Aug 26, 2019

I ran

docker buildx build --platform linux/arm/v7 -t egoncalves/myapi --push 

and it worked, so I ran again adding linux/amd64 and worked.

@blabla1337
Copy link

Hi All,

I have the same issue that the buildx is giving me this error back, unfortunately my build takes up to 12 hours to finish so its really annoying to see next day this error message. Also when I run the docker login after it most of the time it still push the created images but today it started to compile again...

Any solution for this?

@jc21
Copy link

jc21 commented Jul 19, 2020

I'm experiencing this in my CI builds, after docker login I then run a build and it fails with unauthorized only 1 hour and 47 mins later. How long is this token meant to last? I was sure it would be longer than this.

@blabla1337
Copy link

blabla1337 commented Jul 21, 2020

@jc21 I created a new ticket as this one is already closed and they will not pick it up, please comment here #327 and add your output and feedback as well please?

also see this ticket as looks like the same issue:
#324

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

No branches or pull requests

3 participants