-
Notifications
You must be signed in to change notification settings - Fork 506
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
could athens support mirror? #1315
Comments
@daqingshu do you have a use case for this? |
|
I am also interesting in this idea. In my department, we host private repository with Gitea. I had to initial my go module as Is there anyone working on this kind of feature? I would like to involve in. 😄 |
Yep, it's needed! Dep is support it by |
@blueworrybear not that I know of. if you have ideas, feel free to write them in here! @ferryvg @daqingshu behind the scenes, Athens does a
|
@arschles in my opinion, Athens is a transparent proxy, wont change 'go mod download' s result, user can get same result as no proxy also include error.
|
@daqingshu I'm still not sure if we can make this happen technically. If the user executes Aarons-Mac-mini :: ~/Desktop/modtest » go mod download github.com/golang/appengine
module github.com/golang/appengine: not a known dependency
Aarons-Mac-mini :: ~/Desktop/modtest » go get github.com/golang/appengine 1 ↵
go: finding github.com/golang/appengine v1.6.5
go: downloading github.com/golang/appengine v1.6.5
go: extracting github.com/golang/appengine v1.6.5
go get: github.com/golang/[email protected]: parsing go.mod:
module declares its path as: google.golang.org/appengine
but was required as: github.com/golang/appengine The problem lies in the Do you know of a way around that restriction? If you do, I think we can make this work, and I would love to do it 😄 |
go mod download should with version, like: go mod download github.com/golang/appengine@latest
go mod download github.com/golang/[email protected] go get github.com/golang/appengine got error I think this is correct, because go get is legacy mechanism, and wont through GOPROXY |
@daqingshu I see! So, Athens can do the download on the backend, and then when it serves a request for the |
my opnion, the config effect athens, user side should not perceptive other example: |
I don't think that is going to be possible because of the way that the Go client works. Whatever If Athens supported server-side replace directives, the user could run |
I think Athens won't supported server-side replace directives, just transparent proxy. then user compile, actually the cmd is go mod download this cmd to athens server-side let me see, did you said the impossible point is 'athens just download from git.corp.com/golang/[email protected]' ? |
@daqingshu sorry for the delay. yes, the difficult point is having Athens download from Athens uses What do you think about that? |
Thank you. I agree your opinion. |
From what I understand, you have a git server at If so, wouldn't a vanity import server solve your use case? |
Is your feature request related to a problem? Please describe.
a simple way to replace in athens, not in go.mod
batch config in athens
Describe the solution you'd like
Mirrors = [
"golang.org/x/(.*) => github.com/golang/$1",
"google.golang.org/appengine => github.com/golang/appengine",
"google.golang.org/genproto => github.com/google/go-genproto",
"google.golang.org/grpc => github.com/grpc/grpc-go",
"google.golang.org/api => github.com/googleapis/google-api-go-client",
"cloud.google.com/go => github.com/googleapis/google-cloud-go",
]
Describe alternatives you've considered
if impl..ed many project just simple write go.mod file
Additional context
NA
The text was updated successfully, but these errors were encountered: