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

how can i use it in offline environment and store my custom gomod #1780

Open
chikaizhou opened this issue Jul 25, 2022 · 2 comments
Open

how can i use it in offline environment and store my custom gomod #1780

chikaizhou opened this issue Jul 25, 2022 · 2 comments
Labels
awaiting reply Used in issues when a maintainer is waiting for a reply. question Further information is requested

Comments

@chikaizhou
Copy link

I have a offline Office environment and a goproxy for extranet . now i want to build a gomod repository like java maven repository to deploy my project.when i import my own project ,according to the prefix of mod it can be download from the intranet gitlab .
I am trying to run athens by the command

$env:ATHENS_STORAGE = "$(Join-Path $HOME athens-storage)"
md -Path $env:ATHENS_STORAGE
docker run -d -v "$($env:ATHENS_STORAGE):/var/lib/athens" `
   -e ATHENS_DISK_STORAGE_ROOT=/var/lib/athens `
   -e ATHENS_STORAGE_TYPE=disk `
   --name athens-proxy `
   --restart always `
   -p 3000:3000 `
   gomods/athens:latest

And i edit config.toml add a hcl like
downloadURL = "https://goproxy.cn,direct"

mode = "async_redirect"

download "test.com/*" {
mode = "redirect"
downloadURL = "https://gocenter.io"
}
but when i run command like go get github.com/beego/bee/v2 the docker logs display

INFO[12:05PM]: exit status 1: go list -m: github.com/beego@latest: invalid github.com/ import path "github.com/beego"
        http-method=GET http-path=/github.com/beego/@v/list kind=Not Found module= operation=download.ListHandler ops=[download.ListHandler pool.List protocol.List vcsLister.List] request-id=c10c9ce9-65ca-49dc-9de5-2deaf436e70a version=
INFO[12:05PM]: incoming request http-method=GET http-path=/github.com/beego/@v/list http-status=404 request-id=c10c9ce9-65ca-49dc-9de5-2deaf436e70a
@DrPsychick DrPsychick added the question Further information is requested label Mar 28, 2023
@DrPsychick
Copy link
Member

linking issues #1583

@matt0x6F
Copy link
Contributor

@chikaizhou do you mind giving this setup a try again?

@matt0x6F matt0x6F added the awaiting reply Used in issues when a maintainer is waiting for a reply. label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reply Used in issues when a maintainer is waiting for a reply. question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants