Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to download protoc from a maven repo that requires authentication #1563

Open
derrickmdillon opened this issue Jan 31, 2022 · 2 comments
Labels

Comments

@derrickmdillon
Copy link

Short description

My company has it's own Artifactory maven repository that requires authentication. After attempting an update to Akka gRPC 2.1.3 the protoc-jar dependency tries to download a newer version of protoc than it has embedded. It attempts to download from the correct URL extracted from the maven settings.xml but does not support authentication and therefore fails with 401. Relevant code

I would appreciate any guidance as I know this is not an easy one.

@raboof raboof added the sbt label Feb 1, 2022
@raboof
Copy link
Member

raboof commented Feb 1, 2022

Thanks for the ping! Indeed this is tricky: the latest protoc-jar (3.11.4) only embeds versions up to 3.11.4, and we're on 3.19.3, so indeed it'd try and download that version.

I think it's reasonable for us to want a newer version, but I also think it's reasonable that protoc-jar doesn't closely track upstream versions for the embedded binaries.

I'm not aware of any way to inject authentication into URLConnection to make the download work. It also doesn't appear to be possible to pre-populate the cache.

I think the most straightforward way to solve this for you right now would be to install protoc locally and configure sbt-protoc to use that instead of relying on protoc-jar - somewhat like how this is documented at https://doc.akka.io/docs/akka-grpc/current/buildtools/sbt.html#using-a-local-protoc-command for ARM builds. Does that help?

@derrickmdillon
Copy link
Author

Yes thanks for the quick reply! If we come up with something else I will report back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants