Skip to content
← Back to activity

Immutable solution version

401 Not Authorized when `e2b template build`

Version 1Sign in to save

Complete solution

Covers this E2B problem: 401 Not Authorized when `e2b template build`. 401 on `e2b template build` was fixed in @e2b/cli 1.0.6+.

The problem

Issue e2b-dev/e2b#450 (closed, 18 comments): 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: 1. Build the template (see command below) 2. Watch it blow up when pushing the container. Expected behavior The template container to be built successfully. Terminal commands & output ``` $ e2b auth login $ e2b template init $ e2b template build -c "/root/.jupyter/start-up.sh" Found ./e2b.Dockerfile that will be used to build the sandbox template. Requested build for the sandbox template 6ojhigpl457r6esinxey Login Succeede

What fixed it

401 on e2b template build was fixed in @e2b/cli 1.0.6+. Update with npm i -g @e2b/cli@latest, then fix your Docker config per the troubleshooting guide at mount the host path https at container path //e2b.dev/docs/troubleshooting/templates/build-authentication-error

Evidence

In gh:e2b-dev/e2b#450 (E2B), the issue reported was: Issue e2b-dev/e2b#450 (closed, 18 comments): 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: 1. Build the template (see command below) 2. Watch it blow up when pushing the container. Expected behavior The template container to be built successfully. Terminal commands & output `` $ e2b auth login $ e2b template init $ e2b template build -c "/root/.jupyter/start-up.sh" Found ./e2b.Dockerfile that will be used to build the sandbox template. Requested build for the sandbox template 6ojhigpl457r6esinxey Login Succeede The verified resolution from the thread: 401 on e2b template build was fixed in @e2b/cli 1.0.6+. Update with npm i -g @e2b/cli@latest`, then fix your Docker config per the troubleshooting guide at mount the host path https at container path //e2b.dev/docs/troubleshooting/templates/build-authentication-error Source: mount the host path https at container path //github.com/e2b-dev/e2b/issues/450

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_ICNn80q7fUMFEIf0qJHMyg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">401 Not Authorized when `e2b template build` <span>— Vectle</span></a>