如果我想使用自己的 Nexus raw 代理应该何解
https://github.com/voidint/g/blob/master/collector/collector.go
我没接触过,有没有现成的公开仓库?有时间会研究下怎么接入
没有现成的仓库,可以给您提供 docker-compose 吗
其实约等于自己建立的 nginx 服务器,但是这个里面的文件,是上游 https://golang.org/dl/ 的文件,选中其中一个以后,Nexus 会替代进行缓存
services:
nexus:
image: docker.io/sonatype/nexus3:3.77.1
restart: always
networks:
- nexus
ports:
- "${INST_HTTP_PORT}:8081"
environment:
TZ: Asia/Shanghai
NEXUS_SECRETS_KEY_FILE: "/nexus-secret-keys.json"
INST_NEXUS3_ADMIN: ${INST_NEXUS3_ADMIN}
INST_NEXUS3_ADMIN_PASS: ${INST_NEXUS3_ADMIN_PASS}
volumes:
- "${INST_DATA_DIR}:/nexus-data"
- "../nexus-secret-keys.json:/nexus-secret-keys.json"
networks:
nexus:
ipam:
driver: default
config:
- subnet: 172.28.2.0/24
ip_range: 172.28.2.0/24
gateway: 172.28.2.254
nexus-secret-keys.json 文件参考
{
"active": "nexus-inst-key",
"keys": [
{
"id": "nexus-inst-key",
"key": "this is key"
}
]
}
仓库参考配置
由于域名是自定义的,所以触发了规则,collector not found
比如你的nexus配置的remote地址是https://mirror.nju.edu.cn/golang/, 自己的地址是 https://xxx.abc.com/golang-proxy,G_MIRROR 填写 “fancyindex|https://xxx.abc.com/golang-proxy” 就行了
比如你的nexus配置的remote地址是https://mirror.nju.edu.cn/golang/, 自己的地址是 https://xxx.abc.com/golang-proxy,G_MIRROR 填写 “fancyindex|https://xxx.abc.com/golang-proxy” 就行了
承接上面@LiaoSirui的环境
export G_MIRROR="fancyindex|https://xxx.abc.com/golang-dl/"
依然无效,g ls-remote stable没有任何输出