-
Notifications
You must be signed in to change notification settings - Fork 314
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
Allow usage of GOPROXY variable for go module downloads #8504
Comments
Maybe @fviernau or @haikoschol can assist here? |
Go proxy has been deliberately disabled in Ort's Go mod integration, solely to derive the VCS info entirely from the tooling. At the time of doing so (with the current Go version) this was the only way of figuring out the VCS info without re-implementing the rather complex logic from the Go tooling. I'd look for options which work without the use of a Go proxy first. E.g. you say
So, how can you download sources from the corresponding VCSes? via SSH ? |
I tried using this configuration but then I need authentication with an SSH key: Then I need to add a SSH key and this configuration when I run ORT in a Gitlab-CI and this method skips the strengths of using a Go proxy. I looked into some packages that are served by our private Go proxy and found license files and much more which are needed by ort and scancode to determine the relevant information. And I personally like the use of the Go proxy to avoid getting rate limited by global VCS like github.com 😄 |
By strength you are referring to execution time / speed (or anything else)?
..we've deliberately chosen the latter.
You say this to emphasize that skipping private packages is not an option?
To my knowledge rate limits apply to the use of GitHubs REST Api, but not to normal Git operations, such as clones.
This would already solve the entire issue, right? (Maybe an alternative could be to make the repos clonable without authentication, as they are accessible already anyway through the proxy) |
True. However, also see #8361 in this context. |
Yeah, the execution time was my concern in this case. And we typically run our Artifactory with more permissive permissions instead of the Gitlab instance, so the usage of the Go proxy would have been a nice option and is our state of truth in many cases. But I will have fallback to git over SSH in the current state.
I am not aware that I can skip private packages. Please give me a quick hint on how to do that.
I have looked up this and you are right! A quick summary: I will do a fallback to git over SSH for Go dependencies. |
I believe there was a misunderstanding. I was just trying to clarify why you mentioned this in the first place,
@elivlo : Great, so it's fine to close this issue as "clarified" ? |
I guess this was actually directed at me. Yes, I'm aware of that, but I wanted to point out that as least my perspective us unconstitutionally favoring accuracy over speed has relativized, and I think there's a fair use-case for favoring speed over accuracy. But let's continue any such discussion in #8361. |
In this case of |
I am struggling to get ORT running with a private go proxy that serves some libraries that are not downloadable with git over HTTP. I tried to allow the environment variable with this config setting and set the variables:
Go with
go env
shows this output:But when I run the analyzer it will not use the Proxy and tries to fetch the dependencies with Git:
Is there any way to use the proxy set in the variable GOPROXY?
The text was updated successfully, but these errors were encountered: