question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SBT proxy with authentication

See original GitHub issue

steps

I’ve tried as follows:

$ export SBT_OPTS="-Dhttp.proxyHost=... -Dhttp.proxyPort=8080 -Dhttp.proxyUser=... -Dhttp.proxyPassword=..."
$ sbt

also as follows:

$ java -Dhttp.proxyHost=... -Dhttp.proxyPort=8080 -Dhttp.proxyUser=... -Dhttp.proxyPassword=... -Xmx512M -jar /usr/local/Cellar/sbt/0.11.2/libexec/sbt-launch.jar

problem

but I get this error:

Getting org.scala-tools.sbt sbt_2.9.1 0.11.2 ...

:: problems summary ::
:::: WARNINGS
    Your proxy requires authentication.

    Your proxy requires authentication.

Issue Analytics

  • State:closed
  • Created 12 years ago
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

8reactions
wendersonferreiracommented, Jun 16, 2017

Try this

in my ubuntu change ~/.profile at end of file

export SBT_OPTS=“$SBT_OPTS -Dhttp.proxyHost=host -Dhttp.proxyPort=port -Dhttp.proxyUser=username -Dhttp.proxyPassword=password -Dhttps.proxyHost=host -Dhttps.proxyPort=port -Dhttps.proxyUser=username -Dhttps.proxyPassword=password”

enjoy it

2reactions
EdgarLemairecommented, Jan 17, 2019

Sure :

You just have to change and uncomment the line beginning by “cache_peer” as follows :

cache_peer PROXYHOST parent 80 0 no-digest no-query proxy-only login=USERNAME:PASSWORD

(just set your own PROXYHOST (without the http://, just the domain name like “proxy.myproxy.org”), USERNAME and PASSWORD).

Normally, it should work fine, but as I am not very proficient in this kind of stuff, I might have forgotten something. Feel free to ask if the problem persists and I will ask to my colleague which told me how to configure my Squid Proxy 😃

Regards,

Edgar Lemaire

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use sbt from behind proxy? - Stack Overflow
If your proxy requires authentication, don't even bother trying unless it just uses Basic Authentication as SBT doesn't support anything else.
Read more >
sbt Reference Manual — Proxy Repositories
Using credentials for the proxy repository. In case you need to define credentials to connect to your proxy repository, define an environment variable ......
Read more >
Problem with proxy settings for SBT - Cloudera Community
Solved: I am trying to use Scala/Spark from IntelliJ in Windows 7, but it IntelliJ (and SBT command line) - 230612.
Read more >
SBT Behind Proxy - Alternate Stack
SBT Behind Proxy. If you are running sbt behind firewall, you need to update proxy settings to be used: sbtconfig.txt. Update the sbtconfig....
Read more >
Proxy - Coursier
HttpURLConnection automatically picks up proxy related properties. https.proxyHost and https. ... Set those properties when starting sbt, like
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found