I want to use a password containing symbols for my sbt proxy settings

Asked 1 years ago, Updated 1 years ago, 52 views

I installed sbt because I wanted to use scala on my company PC, but when I tried sbt new, I couldn't get the plug-in.

I found a way to configure proxy settings in Qiita, so I tried it, but it didn't work.

sbt/activator proxy settings (v0.13.9/v1.3.7) - Qiita

The reason is that the proxy password is +-[]I think it's because I'm using a symbol that contains {}(), but I don't know how to escape these special characters in sbtconfig.txt.
How do you deal with special characters in the argument given to jvm?
Also, I would appreciate it if you could let me know if there are any pages that describe the handling of such special characters.

Add ---

The sbtconfig.txt configuration is as follows:

#Set the java args to high
-Dfile.encoding=UTF-8
...abbreviated...
- Dhttp.proxyHost=****.****.local
- Dhttp.proxyPassword="hoge{}<>()[]+-Password"
- Dhttp.proxyPort=****
- Dhttp.nonProxyHosts="localhost|127.0.0.1"
- Dhttps.proxyHost=****.****.local
- Dhttps.proxyPassword="hoge{}<>()[]+-Password"
- Dhttps.proxyPort=****
- Dhttps.nonProxyHosts="localhost|127.0.0.1"

When I saw the communication in Wireshark, it looked like this:

CONNECT repo1.maven.org:443 HTTP/1.1
User-Agent: Java/1.8.0_****
Host: repo1.maven.org
Accept: text/html, ... abbreviated...
Proxy-Connection:keep-alive

HTTP/1.1407 Proxy Authentication Required
...abbreviated...
X-Squid-Error: ERR_CACHE_ACCESS_DENIED
...abbreviated...

After a lot of research, I found information that Windows might not be using sbtconfig.txt.

Sbt on Windows!@GitBash-Qiita

However, I am currently struggling to figure out how to fix it...

windows scala sbt

2022-09-30 18:44

1 Answers

When using the sbt proxy, we found the following issues:

SBT proxy with authentication ·Issue#366·sbt/sbt·GitHub

As stated in Issue above, wendersonferreira's comment, it may be fixed to configure not only HTTP but also HTTPS and FTP in the proxy configuration.

I had a quick look at the issue of sbt, and it seemed that there was no problem with the inclusion of symbols (although I didn't check all of them, so there might be some oversight), so

in the questionnaire.

The reason is that the proxy password is +-[]I think it's because I'm using a symbol that contains {}().

Therefore, I replied assuming that there was a proxy authentication error. I am sorry if it missed the target.


2022-09-30 18:44

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.