Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.1K
Views
"Insecure HTTP request is unsupported" Error in Scala

I am getting the following error when attempting to run sbt run to run my Scala code:

insecure HTTP request is unsupported 'http://repo.typesafe.com/typesafe/releases'; switch to HTTPS or opt-in as ("typesafe-releases" at "http://repo.typesafe.com/typesafe/releases").withAllowInsecureProtocol(true), or by using allowInsecureProtocol in repositories file

This is strange because it was working perfectly fine last week and I have changed nothing in the code. I have tried adding ("typesafe-releases" at "http://repo.typesafe.com/typesafe/releases").withAllowInsecureProtocol(true) in my build.sbt file and resolver file, installing Java11, deleting my project folder, and completely reclone my code from the repository but nothing is working. I am using Visual Studios but have also tried on IntelliJ and get the same error.

Any advice would be greatly appreciated, as I have changed nothing and now suddenly my code doesn't compile anymore. Further details:

sbt.version = 1.4.0

Scala code runner version 2.12.10

My current built.sbt (please note that I did not have the resolve part added before, when my code was working fine. It was added as an attempt to resolve the issue but did not work):

scalaVersion := "2.12.10"

name := "name"
organization := "org"
version := "1.0"

libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2",
"org.apache.spark" %% "spark-core" % "3.0.1",
"org.apache.spark" %% "spark-sql" % "3.0.1",
"org.reactivemongo" %% "reactivemongo-bson-api" % "0.20.11",
"org.mongodb.spark" %% "mongo-spark-connector" % "3.0.0",
"com.ibm.db2.jcc" % "db2jcc" % "db2jcc4"
)

resolvers += Resolver.typesafeRepo("releases")

EDIT: I've discovered that this error occurs regardless of project, and even occurs when I simply run sbt by itself.

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Did you try deleting ~/.sbt folder? I had a repositories file in this folder that had HTTP references to the typesafe repo and deleting this folder resolved those sbt HTTP errors.

over 4 years ago · Santiago Trujillo Report

0

For anyone else using an Intellij setup with this issue, see below

Environment:

  • Scala 2.12.7
  • Intellij Ultimate
  • JVM 11

The issue seems to be a clash between the Intellij IDE SBT plugin ( still on 1.3.2 ) and what seems to be a silent update of sbt.

Running sbt ( version 1.4.3 ) in a terminal instead of using the built in plugin fixed the issue.

over 4 years ago · Santiago Trujillo Report

0

As mentioned in repo.typesafe.com, you can add to your sbt:

Resolver.typesafeIvyRepo("releases")

or:

Resolver.typesafeRepo("releases")

Depends whether you are using Ivy or not.

The reason to this warning is the fact that you are using http and not https. From sbt 1.4.0 release notes:

HTTP resolvers require explicit opt-in using .withAllowInsecureProtocol(true)

This is the PR that added it.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!