I am trying to upload my modification of the Extend Service Extension C# sample. I did this successfully before with the actual sample. I ran into problems but after I copied the latest MAKEFILE from the github sample, it got past those errors.
However, I now get a 401: Unauthorized. I tried with the latest sample pulled from github and get the same thing.
Here are my steps and the output.
Command: make imagex_push IMAGE_TAG=v0.0.1 REPO_URL=<repo>
Output (anonymized):
...
=> [linux/arm64 stage-2 10/11] RUN chmod +x /app/grpc_gateway 0.2s
=> [linux/arm64 stage-2 11/11] RUN chmod +x /app/AccelByte.PluginArch.ServiceExtension.Demo.Server 0.3s
=> ERROR exporting to image 7.2s
=> => exporting layers 6.5s
=> => exporting manifest sha256:ab271173e174862028f8912b3fea1f775a690cf80f9e5187e6cbe1cbb2ac3c8e 0.0s
=> => exporting config sha256:b00c362089ebc6dcb5b2f382720bf60c0f0f78e7d91d85094fb3af5ba45cea1a 0.0s
=> => exporting attestation manifest sha256:b1b48c3cd151857dd185d6bb26c87b8995c53f55da6d8835d6bc38ac638a0a1c 0.1s
=> => exporting manifest sha256:d44ada4127aaa3b4ac2e02c0edca6a36d8f6cd0aafcf8ac29c23495e522032b8 0.0s
=> => exporting config sha256:ed7fe1821678935062bf887f1acfb9f2b832880e99dc0fea37c9bce0ca7c16eb 0.0s
=> => exporting attestation manifest sha256:d64bf2c93cb4e251f2b20eaa36194c7dcab9a17d267570d2a237ff8745379933 0.1s
=> => exporting manifest list sha256:5def02f2aa88c5c0dad35a156e28d80f3eab8a1114a3513f32712ded00e5bf08 0.0s
=> => pushing layers 0.3s
------
> exporting to image:
------
ERROR: failed to solve: failed to push <repo>:v0.0.1: unexpected status from HEAD request to https://<repo>/blobs/sha256:<sha>: 401 Unauthorized
make: *** [Makefile:65: imagex_push] Error 1
* The terminal process "bash.exe '-c', 'make imagex_push IMAGE_TAG=v0.0.1 REPO_URL=<repo>'" terminated with exit code: 2.
I was working on other tasks but I got back to this and tried the workarounds again. Here’s what I had to do to get the Extend login step working:
This was the error I saw when trying to run the extend-helper-cli command, above:
# failed to get console mode for stdin: The handle is invalid.
# Error saving credentials: error storing credentials - err: exit status 1, out: `error storing credentials - err: exit status 1, out: `The stub received bad data.``
Move three Docker credential exes to a backup directory (don’t just delete them):
a. C:\Program Files\Docker\Docker\resources\bin\docker-credential-*.exe
Replace the contents of C:\Users\<me>\.docker\config.json with just empty braces: {}
Then when you run the Extend Auth step again, it will succeed and complain about storing the password in plaintext in config.json, but actually it stores an auth token
After logging in successfully and caching the auth token in config.json, copy the exes back into place.
This might not actually be a solution. I got the same error and I had to run my workaround again, which worked. I’m not sure why it broke again but I’ll keep looking at it.