-
Notifications
You must be signed in to change notification settings - Fork 458
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
401 Not Authorized when e2b template build
#450
Comments
Hi @antonioalegria, there's sometimes a problem with long running builds. Could you retry now when the build is already completed? If this doesn't help, could you please share what's your CLI version ( |
The docker build is taking about 46s, and it failed again.. I also tried with a Dockerfile that is practically empty, other than the FROM statement. It also failed. e2b 0.5.10 |
It looks like docker isn't including your credentials. Could you try to login again with Could you also try to check your |
I'm going to check all of those things and get back to you |
am also facing this issue. Tried logging out and back in via cli. On latest version of cli and Docker version 27.2.0. Docker config looks like this
tried removing credsStore entry so that it gets set to osxkeychain, but still same error |
@antonioalegria also, tried to run the docker push command after manually logging into docker via cli. Verified no other keys for docker (eg my own account) were in the keychain. Additionally tried specifying the base64 encoded auth string manually in the docker config. Both approaches did not work, unfortunately. |
No luck.
$ eb2 auth logout
$ e2b auth login
$ cat ~/.docker/config.json {
"auths": {
"docker.e2b.dev": {}
... ... $ e2b template build -c "/root/.jupyter/start-up.sh"
Found sandbox template 6ojhigpl457r6esinxey <-> ./e2b.toml
Found ./e2b.Dockerfile that will be used to build the sandbox template.
Requested build for the sandbox template 6ojhigpl457r6esinxey
Login Succeeded
Building docker image...
[+] Building 92.2s (10/10) FINISHED docker:desktop-linuxx
=> [internal] load build definition from e2b.Dockerfile 0.0ss
=> => transferring dockerfile: 317B 0.0ss
=> [internal] load metadata for docker.io/e2bdev/code-interpreter:latest 1.8ss
=> [auth] e2bdev/code-interpreter:pull token for registry-1.docker.io 0.0ss
=> [internal] load .dockerignore 0.0ss
=> => transferring context: 2B 0.0ss
=> [internal] load build context 0.0ss
=> => transferring context: 1.31kB 0.0ss
=> [1/4] FROM docker.io/e2bdev/code-interpreter:latest@sha256:d418cb3d1ec63ba7bad02b3dc76f9ec951002a125d610e88c8d9c5c81502b053 38.7ss
=> => resolve docker.io/e2bdev/code-interpreter:latest@sha256:d418cb3d1ec63ba7bad02b3dc76f9ec951002a125d610e88c8d9c5c81502b053 0.0ss
=> => sha256:cb64744721f3eecdf32da21252189db03214d9ad2d9a820e8163daaec7dfa7a2 171B / 171B 0.4ss
=> => sha256:232cd6d4d7deb7176a95e79a12926032c9869d9ad44b5cc5f83ee1971433f62e 4.15kB / 4.15kB 0.3ss
=> => sha256:3a9639a1a7f612f6596c419717d3a91f66bb28a56821eba42d5def1d0ed25ee0 153B / 153B 0.6ss
=> => sha256:5a86747b2d876351d0ab5d5792e5176bd9fcac055ecd91c0f63dcaf94e7d890e 8.29kB / 8.29kB 0.5ss
=> => sha256:31f2cee58298506c40faa7984dc01d13c8e65bf83f044e0af3db2f77b6f01c1e 967B / 967B 0.3ss
=> => sha256:ae0d091088968d452f320c432341d5daec9b4e82b7bdaa44ea61ce604843d255 829B / 829B 0.3ss
=> => sha256:f9f7cd63d518e8e097a66151f7c9632b8f88b47d9971df14f07ab519fb6cb5ca 833B / 833B 0.3ss
=> => sha256:0b77b9b2d828b1cade0384c628f5b466e4254493293ee36ec5638a7074af9f03 6.54kB / 6.54kB 0.3ss
=> => sha256:8ce3cae72df84eebb9148871d66994cef1f5e00f0ffa9c3220074a8604e2e02f 14.87MB / 14.87MB 0.9ss
=> => sha256:b97dbf3c7fc4ca3531d99687e3588f84b2f2d11bcc841c5e95976de9c664b275 252B / 252B 0.3ss
=> => sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 32B / 32B 0.2ss
=> => sha256:f34738a27b1632cf1436387004cc084aaf837ac2f6828989ca57053c47136bcb 5.83MB / 5.83MB 0.6ss
=> => sha256:dab0cc4930d40fb6c3658b0d0df6d3f1fb0a7c5a95497ca0cd14d0f0213a7eb6 610.24kB / 610.24kB 0.4ss
=> => sha256:b81ab7cace5c73f2c10fff090fa6d31e5c5074e14448f92a79416712ae99d2b8 5.13MB / 5.13MB 0.9ss
=> => sha256:ea5da05a40c42472bf019d614c47ffd0590e6a300a3891aa9e98496ca2dc5c35 623.37kB / 623.37kB 0.4ss
=> => sha256:c2b295a8e75ab58d79734217d05dfecaa1ce8b76c957d425464e55d7060cd20c 69.01kB / 69.01kB 0.3ss
=> => sha256:a96611e99112eda3c48b66d7ed2a25b8c5ecc4143f2dab436d41ed1a00952343 17.41MB / 17.41MB 1.4ss
=> => sha256:5044ab138a15ee7eaeba8300735287da2f1a96a8c72d814317e2ca79925f1658 10.03MB / 10.03MB 0.5ss
=> => sha256:f4ff4fa57344bc0e6a6f0cb0fee68f920c420ab639dc88b6560f3c6bc165c330 11.35kB / 11.35kB 0.3ss
=> => sha256:01d0569fc8ac9394e7dad04a9469279a834f84bfb2d36b209f082203e158a565 14.78MB / 14.78MB 1.0ss
=> => sha256:7254ff544807430c2c49c6f15b46f30dbe5f953b019c88ae022725f62641ea3d 148.28MB / 148.28MB 8.8ss
=> => sha256:68c9014062993cfb2e162019c0fffccf85a4b3d33858571bf6ecd929c14fe180 400.21MB / 400.21MB 21.3ss
=> => sha256:01038c9dab2ce700aaa3907b8726894ded9a3c1eb72d4c98ec266537aa73ece4 457B / 457B 0.3ss
=> => sha256:397eb35c6189715359d10225a8de0816444fba2b268f3a88173611e366c1db5d 77.59MB / 77.78MB 87.3ss
=> => sha256:4450f7f310b51cada7d1184f5dd07f95194b47d7cbc0d26bb5e29b1ec1864375 145.55MB / 145.55MB 6.9ss
=> => sha256:8cfecd7fda2f274e4460d17428bffad4ef1e24a77ca3f55bfc39752d4ac2fd7d 3.08MB / 3.08MB 0.4ss
=> => sha256:35c32d99ea0a2492e74a9bc78cf7eb4548579d1d31977bd33bb7fadc9caf6231 6.16MB / 6.16MB 0.7ss
=> => sha256:62fcc761cda6f439ef0e7ffefa86dfe0af722d1c05f0b2d1f1c3d845d1af3676 232B / 232B 0.3ss
=> => sha256:a096358acc3df7f42551c9a1d9bb0c413529d8f6d688cfffb5870e4450f04ded 17.15MB / 17.15MB 1.1ss
=> => sha256:1c8ff076d818ad6b8557e03e10c83657cc716ab287c8380054ff91571c8cae81 211.27MB / 211.27MB 10.7ss
=> => sha256:2e66a70da0bec13fb3d492fcdef60fd8a5ef0a1a65c4e8a4909e26742852f0f2 64.15MB / 64.15MB 3.8ss
=> => sha256:2e6afa3f266c11e8960349e7866203a9df478a50362bb5488c45fe39d99b2707 24.05MB / 24.05MB 1.8ss
=> => sha256:8cd46d290033f265db57fd808ac81c444ec5a5b3f189c3d6d85043b647336913 49.56MB / 49.56MB 3.4ss
=> => extracting sha256:8cd46d290033f265db57fd808ac81c444ec5a5b3f189c3d6d85043b647336913 0.9ss
=> => extracting sha256:2e6afa3f266c11e8960349e7866203a9df478a50362bb5488c45fe39d99b2707 0.3ss
=> => extracting sha256:2e66a70da0bec13fb3d492fcdef60fd8a5ef0a1a65c4e8a4909e26742852f0f2 1.2ss
=> => extracting sha256:1c8ff076d818ad6b8557e03e10c83657cc716ab287c8380054ff91571c8cae81 3.0s
=> => extracting sha256:35c32d99ea0a2492e74a9bc78cf7eb4548579d1d31977bd33bb7fadc9caf6231 0.1s
=> => extracting sha256:a096358acc3df7f42551c9a1d9bb0c413529d8f6d688cfffb5870e4450f04ded 0.3s
=> => extracting sha256:62fcc761cda6f439ef0e7ffefa86dfe0af722d1c05f0b2d1f1c3d845d1af3676 0.0s
=> => extracting sha256:8cfecd7fda2f274e4460d17428bffad4ef1e24a77ca3f55bfc39752d4ac2fd7d 0.1s
=> => extracting sha256:4450f7f310b51cada7d1184f5dd07f95194b47d7cbc0d26bb5e29b1ec1864375 1.2s
=> => extracting sha256:397eb35c6189715359d10225a8de0816444fba2b268f3a88173611e366c1db5d 2.1s
=> => extracting sha256:01038c9dab2ce700aaa3907b8726894ded9a3c1eb72d4c98ec266537aa73ece4 0.0s
=> => extracting sha256:68c9014062993cfb2e162019c0fffccf85a4b3d33858571bf6ecd929c14fe180 7.5s
=> => extracting sha256:7254ff544807430c2c49c6f15b46f30dbe5f953b019c88ae022725f62641ea3d 1.8s
=> => extracting sha256:01d0569fc8ac9394e7dad04a9469279a834f84bfb2d36b209f082203e158a565 0.2s
=> => extracting sha256:f4ff4fa57344bc0e6a6f0cb0fee68f920c420ab639dc88b6560f3c6bc165c330 0.0s
=> => extracting sha256:5044ab138a15ee7eaeba8300735287da2f1a96a8c72d814317e2ca79925f1658 0.1s
=> => extracting sha256:b81ab7cace5c73f2c10fff090fa6d31e5c5074e14448f92a79416712ae99d2b8 0.2s
=> => extracting sha256:a96611e99112eda3c48b66d7ed2a25b8c5ecc4143f2dab436d41ed1a00952343 0.2s
=> => extracting sha256:c2b295a8e75ab58d79734217d05dfecaa1ce8b76c957d425464e55d7060cd20c 0.0s
=> => extracting sha256:ea5da05a40c42472bf019d614c47ffd0590e6a300a3891aa9e98496ca2dc5c35 0.0s
=> => extracting sha256:dab0cc4930d40fb6c3658b0d0df6d3f1fb0a7c5a95497ca0cd14d0f0213a7eb6 0.0s
=> => extracting sha256:f34738a27b1632cf1436387004cc084aaf837ac2f6828989ca57053c47136bcb 0.2s
=> => extracting sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 0.0s
=> => extracting sha256:b97dbf3c7fc4ca3531d99687e3588f84b2f2d11bcc841c5e95976de9c664b275 0.0s
=> => extracting sha256:8ce3cae72df84eebb9148871d66994cef1f5e00f0ffa9c3220074a8604e2e02f 0.3s
=> => extracting sha256:0b77b9b2d828b1cade0384c628f5b466e4254493293ee36ec5638a7074af9f03 0.0s
=> => extracting sha256:f9f7cd63d518e8e097a66151f7c9632b8f88b47d9971df14f07ab519fb6cb5ca 0.0s
=> => extracting sha256:ae0d091088968d452f320c432341d5daec9b4e82b7bdaa44ea61ce604843d255 0.0s
=> => extracting sha256:31f2cee58298506c40faa7984dc01d13c8e65bf83f044e0af3db2f77b6f01c1e 0.0s
=> => extracting sha256:3a9639a1a7f612f6596c419717d3a91f66bb28a56821eba42d5def1d0ed25ee0 0.0s
=> => extracting sha256:5a86747b2d876351d0ab5d5792e5176bd9fcac055ecd91c0f63dcaf94e7d890e 0.0s
=> => extracting sha256:cb64744721f3eecdf32da21252189db03214d9ad2d9a820e8163daaec7dfa7a2 0.0s
=> => extracting sha256:232cd6d4d7deb7176a95e79a12926032c9869d9ad44b5cc5f83ee1971433f62e 0.0s
=> [2/4] COPY e2b.* /tmp/. 0.1s
=> [3/4] RUN pip install -U pip 2.5s
=> [4/4] RUN pip install -U -r /tmp/e2b.requirements.txt --no-input --only-binary=:all: --use-feature=fast-deps 36.2s
=> exporting to image 12.8s
=> => exporting layers 12.7s
=> => exporting manifest sha256:41452c1fbdbada1bb55449dd8d1df934967f9ffafd1e6a91721f3357926a07ab 0.0s
=> => exporting config sha256:f4028f1c5bb5938cf5a8dcef94e50c5cee605fbaf741edbc68b0fbb70ce6778b 0.0s
=> => exporting attestation manifest sha256:d6927335ca3cc8eb707ffc3ac5699ba497d34a6b6d04888f337c30b28f4bb58a 0.0s
=> => exporting manifest list sha256:25ac28d129cf3d22a9893044d75319b380e84e8897f55c54098160c98a4dbfbf 0.0s
=> => naming to docker.e2b.dev/e2b/custom-envs/6ojhigpl457r6esinxey:80759137-f91e-45b2-ab2a-bcc90de716e5 0.0s
View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/hlvsjk98a1jh8rdngqj3p0um1
Docker image built.
Pushing docker image...
The push refers to repository [docker.e2b.dev/e2b/custom-envs/6ojhigpl457r6esinxey]
31f2cee58298: Waiting
3a9639a1a7f6: Waiting
cb64744721f3: Waiting
e10454e14400: Waiting
b81ab7cace5c: Waiting
ae0d09108896: Waiting
68c901406299: Waiting
f4ff4fa57344: Waiting
dab0cc4930d4: Waiting
8ce3cae72df8: Waiting
5a86747b2d87: Waiting
35c32d99ea0a: Waiting
8cfecd7fda2f: Waiting
397eb35c6189: Waiting
c3d41ba70849: Waiting
2e66a70da0be: Waiting
a096358acc3d: Waiting
232cd6d4d7de: Waiting
4450f7f310b5: Waiting
01038c9dab2c: Waiting
f9f7cd63d518: Waiting
f4f055e77d50: Waiting
a96611e99112: Waiting
f34738a27b16: Waiting
b97dbf3c7fc4: Waiting
2e6afa3f266c: Waiting
62fcc761cda6: Waiting
0b77b9b2d828: Waiting
8cd46d290033: Waiting
1c8ff076d818: Waiting
01d0569fc8ac: Waiting
c2b295a8e75a: Waiting
ea5da05a40c4: Waiting
4f4fb700ef54: Waiting
8b9f90a0f362: Waiting
7254ff544807: Waiting
5044ab138a15: Waiting
unexpected status from HEAD request to https://docker.e2b.dev/v2/e2b/custom-envs/6ojhigpl457r6esinxey/blobs/sha256:3a9639a1a7f612f6596c419717d3a91f66bb28a56821eba42d5def1d0ed25ee0: 401 Unauthorized
Error: Command failed: docker push docker.e2b.dev/e2b/custom-envs/6ojhigpl457r6esinxey:80759137-f91e-45b2-ab2a-bcc90de716e5
at genericNodeError (node:internal/errors:983:15)
at wrappedFn (node:internal/errors:537:14)
at checkExecSyncError (node:child_process:889:11)
at Object.execSync (node:child_process:961:15)
at e.<anonymous> (/opt/homebrew/lib/node_modules/@e2b/cli/src/commands/template/build.ts:309:23) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 42837,
stdout: null,
stderr: null
} |
Hi team. I'm running into the same issue. Any updates here? Thanks a lot! |
Hi @zxh3, I am not able to reproduce this error and we still didn't figure out, why it sometimes happens to someone. I would recommend trying to use another builder (probably not relevant here, but it solved some weird errors before). If it doesn't help, would you be able to test it on another computer / VM / CICD pipeline, so we can rule out some config / account specific stuff and be sure it's related to docker config on your computer? |
Can you provide an example of what kind of builder would be better than the default one? |
Sorry, I didn't remember it correctly. Users having this issue had more docker builders already available, you can see it by running
if not, try if you have multiple contexts
If you find multiple for at least one of the commands. Try
|
Is there any fix for this issue? I am on Windows. Tried just about everything. I have included my E2B_API_KEY in my .env, I have logged in using e2b auth login, purged and restarted docker, even tried to manually add my e2b creds to config.json. e2b template build fails when pushing to e2b.dev. unexpected status from HEAD request to https://docker.e2b.dev/v2/e2b/custom-envs....... Error: Command failed: docker push docker.e2b.dev/e2b/custom-envs...... |
Ok, just did logout and login and tried to build and push a custom image and got the same error... If this is a 401 unauthorized it's pretty clear the auth is not being integrated properly -- what is your recommendation? Without this I need to run a pip install when the sandbox is brought up and this makes the startup slow. Thank you so much for your help -- i'm happy to help debug this. Let me know. |
@weirdlookingjay @antonioalegria we're trying to reproduce this issue internally but failing. It's probably some Docker configuration. We're looking into this more |
Hi, I'm happy to jump on a call if that helps. Would really like to see this fix so that I could speed up our sandbox startup time. |
Thank you @antonioalegria! We managed to get more information from other users and need to try out a few things that could fix it. We'll reach out if need more data |
Describe the bug
When building my custom template, I get a 401 unauthorized when the container is being pushed.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The template container to be built successfully.
Terminal commands & output
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: