athens
athens copied to clipboard
Upstream configuration does not take effect
Is your feature request related to a problem? Please describe. I want the private package to be pulled directly from the private code repository. Pull from the upstream server when the third-party package does not exist locally. I don’t know if my configuration is wrong, but it doesn’t take effect.
Additional context version: v0.6.1
ENV:
GOPROXY=https://mirrors.aliyun.com/goproxy/,direct
configuration:
GoBinary = "go"
GoEnv = "development"
GoGetWorkers = 40
ProtocolWorkers = 30
LogLevel = "debug"
CloudRuntime = "none"
EnablePprof = false
PprofPort = ":3001"
FilterFile = "/config/filter-file.conf"
Timeout = 300
Port = ":3000"
GlobalEndpoint = "https://mirrors.aliyun.com/goproxy/"
ValidatorHook = ""
PathPrefix = ""
NETRCPath = ""
GithubToken = ""
HGRCPath = ""
TraceExporter = ""
TraceExporterURL = "http://localhost:14268"
StatsExporter = "prometheus"
SumDBs = ["https://sum.golang.org"]
NoSumPatterns = ["code.test.com/*","gitlab.pri.test.com/*"]
DownloadMode = "file:/config/download-hcl.conf"
SingleFlightType = "memory"
StorageType = "minio"
[SingleFlight]
[SingleFlight.Etcd]
Endpoints = "localhost:2379,localhost:22379,localhost:32379"
[SingleFlight.Redis]
Endpoint = "127.0.0.1:6379"
[Storage]
[Storage.Disk]
RootPath = "/path/on/disk"
[Storage.Minio]
Endpoint = "oss"
Key = "key"
Secret = "secret"
EnableSSL = true
Bucket = "athens"
Region = ""
download-hcl.conf:
downloadURL = "https://mirrors.aliyun.com/goproxy/"
mode = "sync"
download "code.test.com/server/*" {
mode = "sync"
downloadURL = "https://code.test.com"
}
download "gitlab.pri.test.com/*" {
mode = "sync"
downloadURL = "https://gitlab.pri.test.com"
}
logs:
time="2020-12-24T02:29:21Z" level=info msg="exit status 1: go list -m: module github.com/afex/hystrix-go/hystrix: Get https://proxy.golang.org/github.com/afex/hystrix-go/hystrix/@v/list: Forwarding failure\n" http-method=GET http-path=/github.com/afex/hystrix-go/hystrix/@v/list http-url=/github.com/afex/hystrix-go/hystrix/@v/list kind="Not Found" module= operation=download.ListHandler ops="[download.ListHandler pool.List protocol.List vcsLister.List]" version=
time="2020-12-24T02:29:21Z" level=info msg="exit status 1: go list -m: module github.com/afex/hystrix-go: Get https://proxy.golang.org/github.com/afex/hystrix-go/@v/list: Forwarding failure\n" http-method=GET http-path=/github.com/afex/hystrix-go/@v/list http-url=/github.com/afex/hystrix-go/@v/list kind="Not Found" module= operation=download.ListHandler ops="[download.ListHandler pool.List protocol.List vcsLister.List]" version=
time="2020-12-24T02:29:21Z" level=info msg="exit status 1: go list -m: module github.com/afex: Get https://proxy.golang.org/github.com/afex/@v/list: Forwarding failure\n" http-method=GET http-path=/github.com/afex/@v/list http-url=/github.com/afex/@v/list kind="Not Found" module= operation=download.ListHandler ops="[download.ListHandler pool.List protocol.List vcsLister.List]" version=
time="2020-12-24T02:29:21Z" level=info msg="exit status 1: go list -m: module github.com: Get https://proxy.golang.org/github.com/@v/list: Forwarding failure\n" http-method=GET http-path=/github.com/@v/list http-url=/github.com/@v/list kind="Not Found" module= operation=download.ListHandler ops="[download.ListHandler pool.List protocol.List vcsLister.List]" version=
Why does the log show that the package is pulled from https://proxy.golang.org instead of https://mirrors.aliyun.com/goproxy/ ?I don’t know why it fails to pull this package.
@wangycc can I see what is in the file you've specified as your FilterFile
(/config/filter-file.conf
)?
@arschles I have the same question ,I am trying to use athens on docker ,and i only edit config.toml where DownloadMode = "file:/config/download.hcl" and create a file download.hcl ,content is
downloadURL = "https://goproxy.cn,direct"
mode = "redirect"
download "test.com/*" { mode = "redirect" downloadURL = "http://google.com/" }
And i run command go get github.com/beego/bee/v2
,but i saw the docker log display
INFO[9:26AM]: 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=38f64e59-bf64-4bc7-b3e8-eb393cf44897 version= INFO[9:26AM]: incoming request http-method=GET http-path=/github.com/beego/@v/list http-status=404 request-id=38f64e59-bf64-4bc7-b3e8-eb393cf44897