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

.netrc not working in container with application #2008

Open
YannickTeKulve opened this issue Nov 27, 2024 · 1 comment
Open

.netrc not working in container with application #2008

YannickTeKulve opened this issue Nov 27, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@YannickTeKulve
Copy link

YannickTeKulve commented Nov 27, 2024

Describe the bug
I'm getting the following error with the the .netrc file

0eef3165cdc: exit status 128:
	fatal: could not read Username for 'https://github.com': terminal prompts disabled
Confirm the import path was entered correctly.
If this is a private repository, see https://golang.org/doc/faq#git_https for additional information

I'm using the helm chart with .netrc enabled. It's correctly moved to the (root) home dir. When I run the go mod download github.com/myorg/[email protected] from the root home folder in the container it correctly downloads the file. But when it try it with the proxy it does not work. I have also set the GOPROXY and GONOSUM locally correct (downloading also works without the proxy).

values.yaml:

ingress:
  enabled: true
  className: "nginx"
  tls:
    - hosts:
        - "placeholder"
      secretName: placeholder
    - host: placeholder
      paths:
        - path: /
          pathType: ImplementationSpecific

upstreamProxy:
  enabled: true
  url: "https://proxy.golang.org"

storage:
  type: minio
  minio:
    endpoint: placeholder
    accessKey: placeholder
    secretKey: placeholder
    bucket: "placeholder"
netrc:
  enabled: true
  existingSecret: mysecret
configEnvVars:
  - name: ATHENS_GONOSUM_PATTERNS
    value: "github.com/myorg/*"
  - name: GONOSUMDB
    value: "github.com/myorg/*"
  - name: ATHENS_LOG_LEVEL
    value: TRACE

To Reproduce
run go mod download

Expected behavior
It downloads the module

Environment (please complete the following information):

  • OS: k8s
  • Go version : 1.23
  • Proxy version : v0.15.4
  • Storage (fs/mongodb/s3 etc.) :minio
@YannickTeKulve
Copy link
Author

So I got it working by setting the ‘GONOSUMDB’ environment variable in the container. I assumed ‘ ATHENS_GONOSUM_PATTERNS’ would be enough but apparently it is not. Also the documentation for client side is wrong when opening anthens (‘GONOSUM’ should be ‘GONOSUMDB’) I will make a pr next week to fix this.

@matt0x6F matt0x6F added the bug Something isn't working label Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants