Repository navigation
Error resolving private repository for Go using git #281
Description
Activity
The error
Temporary failure in name resolutionmakes me think this might have been a DNS issue??Does it still happen for you?
It is possibly DNS related, but not temporary, as I still see this error. I wonder if the docker containers need additional information to resolve the DNS.
Please note: The cli commands also run in a container as part of a Jenkins pipeline, so you have docker-in-docker.
Could the issue be similar to #113 where we need to specify a host and/or port to the proxy container? Keep in mind that this is docker-in-docker.
I've tried to
docker runthe proxy container to see it while running, but it fails because of needing a config.json mounted.Edit: Another consideration is maybe this isn't the real error. I see a 401 immediately before:
proxy | 2024/07/30 20:58:18 [276] 401 https://bitbucket.redacted.com:443/scm/project/repo-name/info/refs?service=git-upload-pack proxy | 2024/07/30 20:58:18 [277] POST http://host.docker.internal:8088/update_jobs/cli/record_update_job_error {"data":{"error-type":"dependency_file_not_resolvable","error-details":{"message":"go: bitbucket.redacted.com/scm/project/repo-name.git@v1.18.0: reading bitbucket.redacted.com/scm/project/repo-name.git/go.mod at revision v1.18.0: git ls-remote -q origin in /home/dependabot/go/pkg/mod/cache/vcs/8e0121133f6c288299f7e70be62d8ac7f27dab8b15529e43912ac2ced908a043: exit status 128:\n\tfatal: unable to look up bitbucket.redacted.com (port 9418) (Temporary failure in name resolution)"}},"type":"record_update_job_error"}I've seen problems authenticating when using improper keys or values for a specific credential type in the undocumented job.yaml credentials.
CC: @jakecoffman since he worked on #113
It sounds like the network has an internal DNS server but the Proxy doesn't know about it so it's failing to resolve the host. We would probably need to add an option for that and/or have the CLI inject it into the Proxy automatically when it finds it on the host system.
We have a Go repo we are attempting to scan with dependabot/cli, but it fails with:
Since this only seems to be happening on dependencies referencing a private repository, I've attempted to fix this with configuring auth in my job.yaml:
But the error remains unchanged and doesn't mention authenticating.
For go using a git dependency, does my job.yaml look right?
How can I resolve this dns look up?
The host should be reachable, as the repo this project is cloned from is hosted on the same bitbucket as the module we import. Also, we have other private registries for other languages which dependabot/cli has accessed.