انتقل إلى المحتوى
المدونة

ComputerCraft "Could not create a secure connection" fix

ComputerCraft pastebin get says "Could not create a secure connection"? Check the http config, old Java certificates, clock, firewall and disk, in order.

The Liite team8 دقيقة قراءة

Short answer

The game is either not allowed to make web requests, or the Java running Minecraft doesn't trust the site's HTTPS certificate. Check that http is enabled in the ComputerCraft config first, then update Java (or add the missing certificates), then check the clock and network.

You typed pastebin get <code> <name> on an in-game computer and it refused to download. The error is:

Could not create a secure connection

The message is generic. At least five different problems produce it, so the fastest route is to rule them out in order of likelihood.

Why it happens

ComputerCraft's pastebin program downloads over HTTPS from inside the game's Java process. If any link in that chain fails, you get the same text. These are the causes, most common first.

  • HTTP is switched off or restricted in the mod config. People on the ComputerCraft subreddit report that some modpacks, including recent All the Mods packs, ship with HTTP disabled. A pack author's choice like this isn't undone by updating the mod.
  • Old Java without current root certificates. Older Minecraft launchers bundle Java 8. A Java build that lacks a root certificate can't validate sites that depend on it. For example, Let's Encrypt's compatibility page lists Java >= 7u151, 8u141, 9+ as trusting its ISRG Root X1 root, so anything older fails on sites that chain to it. The community mod LetsEncryptCraft exists for exactly this situation.
  • A wrong system clock. Certificates are only valid within a date range. A clock that is far off makes a valid certificate look expired or not yet valid.
  • A firewall, proxy, antivirus or school or work network that blocks or intercepts HTTPS connections.
  • A full disk. People report this as a cause. It is uncommon, and we can't say why it would show up as a TLS error, so treat it as a last check.

We can't tell which applies from the message alone. One more thing is worth knowing: a browser that opens pastebin.com fine says nothing about the game, because Minecraft uses its own bundled Java trust store, not the browser's.

Step-by-step fixes

Fix 1: Make sure HTTP is enabled

  1. Stop the server, or close the world if you play single player.
  2. Find the ComputerCraft config. On a server it is in the server's config folder. In single player it can be in the world's serverconfig folder or the instance's config folder, depending on version and pack. If you can't find it, search the config folders for files that mention http.
  3. Open it and find the http section with an enabled option.
  4. If enabled is false, change it to true and save.
  5. Start the game again. Config changes generally need a restart of the world or server.

File names and layout differ between ComputerCraft versions and forks, so match on the setting names rather than on a path.

Fix 2: Check the allow rules

The same http section normally holds rules that say which hosts and ports computers may reach. If someone customized them, or they deny everything, pastebin.com stays blocked even with HTTP on. If you aren't sure what the rules should say, restore the defaults by deleting the customized rules or, if you can, regenerating the config file. Back it up first.

Back up before editing

Copy the config file before you change or delete anything. Modpacks often tune these values deliberately, and you may want to compare against the original.

Fix 3: Update the Java that runs Minecraft

  1. Open your launcher's settings for the instance you play.
  2. Find the Java runtime or Java path setting.
  3. Switch to a newer Java runtime that your Minecraft version supports. Which versions work depends on the Minecraft version, so check your modpack's page before changing it.
  4. Launch the game and retry.

Newer Minecraft versions already require newer Java, so this cause shows up mostly on old versions and old launchers.

Fix 4: Add the missing certificates on old Java

If you have to stay on an old Java (for example, a pinned old modpack), the community mod LetsEncryptCraft was written to add missing root certificates to the game's trust store. Confirm it supports your Minecraft version and mod loader before you install it, and install it on the server too if the server is where pastebin runs.

Fix 5: Correct the system clock

  1. On the machine running the game (or the server host), set the date, time and time zone correctly.
  2. Turn on automatic time sync.
  3. Restart the game, not just the world.

A virtual machine, a hosted server or a machine with a dead clock battery are the usual suspects.

Fix 6: Rule out the network

  1. Open https://pastebin.com in a browser on the same machine.
  2. If that fails too, the problem is your network, a filter or a firewall, not ComputerCraft. Try another network, such as a phone hotspot, to confirm.
  3. If the browser works but the game doesn't, check whether antivirus or a firewall prompts for or blocks Java. Allow the Java that your launcher uses.
  4. On a rented server, ask the host whether outbound HTTPS is restricted.

Fix 7: Free some disk space

Check the drive that holds the game or server. If it is nearly full, clear some room and retry. This is the least likely cause, so leave it for last.

Which fix fits your situation

SituationLikely causeTry first
Modern pack, current MinecraftHTTP disabled or restricted in configFixes 1 and 2
Old Minecraft version or old launcherBundled Java 8 lacks certificatesFixes 3 and 4
Every HTTPS site fails, in game and in a browserClock or networkFixes 5 and 6
It worked before and then stoppedA pack update reset the config, a new Java install, a drifted clock, or a full diskFixes 1, 5 and 7
Browser works, game doesn't, config is fineJava trust storeFixes 3 and 4

Retry after each change

Retry pastebin get after every single change and stop when it works. That way you know the cause, and you won't leave unneeded changes in the config.

What won't help

  • Reinstalling ComputerCraft alone. The certificates live in Java, not in the mod, and a reinstall won't override a config that the modpack sets.
  • Using wget or http.get instead. They go through the same HTTP setting and the same Java, so expect the same failure.
  • Waiting for Pastebin to come back. If other sites load in your browser and the error only appears in game, the cause is almost certainly on your side.

Checklist before you try again

  • http is enabled = true in the ComputerCraft config, and you restarted after saving.
  • The allow rules still permit pastebin.com (defaults are fine).
  • Minecraft runs on a Java version your pack supports, and not an outdated Java 8 build.
  • The system date, time and time zone are correct, with automatic sync on.
  • A browser on the same machine opens https://pastebin.com.
  • The drive has free space.

If nothing works

Ask in the support channel for your modpack (its page or Discord) or on the ComputerCraft community forum. Include:

  • the exact error text;
  • your Minecraft version and loader (Forge, Fabric, NeoForge);
  • the ComputerCraft or CC: Tweaked version, or the modpack name and version;
  • the Java version your launcher uses;
  • whether http is enabled in the config, and whether the allow rules were changed;
  • whether https://pastebin.com opens in a browser on the same machine;
  • whether it's single player or a server, and who hosts the server.

A message you can adapt:

Running `pastebin get <code> <name>` in ComputerCraft fails with:
"Could not create a secure connection"

Minecraft: <version>, loader: <Forge/Fabric/NeoForge>
Mod/modpack: <name and version>
Java: <version from launcher>
Single player or server: <which; host name if rented>
http enabled in config: <true/false>, allow rules changed: <yes/no>
pastebin.com opens in a browser on this machine: <yes/no>
System clock correct: <yes/no>
Already tried: <list the fixes>

Common questions

Does the error mean Pastebin is down?

Usually not. If pastebin.com loads in a browser on the same machine, the problem sits between the game and the site: config, Java, clock or network. Check Pastebin's own site first to rule out an outage.

Why does it work in my browser but not in the game?

The game uses its bundled Java and that Java's own list of trusted certificates. A modern browser has a newer list, and it isn't affected by the mod's HTTP setting.

Is it safe to turn HTTP on?

HTTP lets computers in the game request web pages and download files, and a pack may disable it on purpose to stop that. On a server you run for others, think about who can run programs on computers before enabling it, and keep the allow rules narrow if you can.

Does it matter if I use wget instead of pastebin get?

No. Both rely on the same HTTP setting and the same Java, so if one fails with this error, the other will too.