Repository navigation
Closed
Description
What are you trying to do?
trying to load private module frm a private git instance
dagger -m 'ssh://[email protected]/raghavendramallela/sample-repo.git/dgmodules/node@main' functions -vvvvvvv
✔ connect 2.5s
✔ starting engine 0.0s
✔ connecting to engine 0.7s
✔ starting session 1.2s
✔ subscribing to telemetry 0.6s
✔ consuming /v1/traces 0.6s
✔ consuming /v1/logs 0.0s
✔ consuming /v1/metrics 0.0s
✘ initialize 16.7s
! failed to get configured module: failed to get module ref kind: input: moduleSource resolve: failed to resolve git src to commit: failed to load cache key: failed to fetch remote ssh://[email protected]/raghavendramallela/sample-repo.git: git error: exit status 128
✘ resolving module ref 16.7s
! failed to get configured module: failed to get module ref kind: input: moduleSource resolve: failed to resolve git src to commit: failed to load cache key: failed to fetch remote ssh://[email protected]/raghavendramallela/sample-repo.git: git error: exit status 128
✔ cache request: mkfile /schema.json 0.0s
✔ load cache: mkfile /schema.json 0.0s
✔ cache request: blob://sha256:0aff3009fd4981ff50337ab097a7ad9370b8b2d6eccacb5971edd2cad68103cd 0.0s
✔ load cache: blob://sha256:0aff3009fd4981ff50337ab097a7ad9370b8b2d6eccacb5971edd2cad68103cd 0.0s
✔ blob(digest: "sha256:0aff3009fd4981ff50337ab097a7ad9370b8b2d6eccacb5971edd2cad68103cd", mediaType: "application/vnd.oci.image.layer.v1.tar", size: 167936, uncompressed: "sha256:0aff3009fd4981ff50337ab097a7ad9370b8b2d6eccacb5971edd2cad68103cd"): Directory! = xxh3:f454a91b472a82b9 0.0s
✔ Directory.file(path: "schema.json"): File! = xxh3:73efab4f927585b8 0.4s
✘ moduleSource(refString: "ssh://[email protected]/raghavendramallela/sample-repo.git/dgmodules/node@main"): ModuleSource! = xxh3:dd58abd5505841d6 15.2s
! failed to resolve git src to commit: failed to load cache key: failed to fetch remote ssh://[email protected]/raghavendramallela/sample-repo.git: git error: exit status 128
✔ parseRefString: ssh://[email protected]/raghavendramallela/sample-repo.git/dgmodules/node@main 0.0s
✔ git(url: "ssh://[email protected]/raghavendramallela/sample-repo.git"): GitRepository! = xxh3:c0075b0f5de11074 0.0s
✔ host: Host! = xxh3:ff73c85214b8f75c 0.0s
✔ Host.__internalSocket(accessor: "2f746d702f7373682d383254536f633846494149712f6167656e742e313537363539b613679a0814d9ec772f95d778c35fc5ff1697c493715653c6c712144292c5ad"): Socket! = xxh3:868707ad72e3f5af 0.0s
✔ GitRepository.commit(id: "main"): GitRef! = xxh3:5d7ff737156ac626 0.0s
✘ cache request: git://privgit.com/raghavendramallela/sample-repo.git#main 5.2s
! failed to fetch remote ssh://[email protected]/raghavendramallela/sample-repo.git: git error: exit status 128
Error: failed to get configured module: failed to get module ref kind: input: moduleSource resolve: failed to resolve git src to commit: failed to load cache key: failed to fetch remote ssh://[email protected]/raghavendramallela/sample-repo.git: git error: exit status 128
stderr:
ssh: Could not resolve hostname privgit.com: Try again
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Why is this important to you?
a way to mount config files like ~/.gitconfig or ~/.ssh/config for dagger functions or any related dagger cli commands to use dagger "privately"
How are you currently working around this?
No response
Metadata
Metadata
Assignees
Labels
No labels
Activity
raghavendramallela commentedon Oct 29, 2024
if
_EXPERIMENTAL_DAGGER_RUNNER_HOSTuses proxy vars likehttp_proxyorhttps_proxy,can dagger engine add
git config --global https.proxy='http://proxyserver.com:443'for dagger functions or any related dagger engine "git" calls?marcosnils commentedon Oct 29, 2024
The only supported mechanism to use private modules is via
ssh agentcurrently. More information can be found here: https://docs.dagger.io/api/remote-modules/#configuring-ssh-authenticationHaving said that, PAT support will also be landing soon.
#8805
Let us know if you have other questions 👐
grouville commentedon Oct 29, 2024
Related comment from @raghavendramallela #8805 (comment). It seems that the
git.tags()does not resolve theHTTPS_PROXYenv var, even when added to the engine 👀As a side question: introducing an automatic dependency on the
.gitconfigis something to be discussed, as it breaks the local / ci agnosticity ; but if you're ok to have your own engine with such params mounted inside, I don't see any issue.It seems to be, indeed, a bug on our end
[-]✨ <title>load private modules via mounting git config or ssh config[/-][+]✨ load private modules via mounting git config or ssh config[/+]raghavendramallela commentedon Oct 31, 2024
This issue is related to proxy & using
HTTPS_PROXYshould be fine IMO,but if user want to configure how git is used for engine, using
.gitconfigdependency will be good option.grouville commentedon Nov 20, 2024
Might be fixed by #9007, if I understood it properly
rajatjindal commentedon Jan 3, 2025
me and Marcos just had a sync regarding what we can do here. Here is what I will be trying out:
I think this should fix private deps for atleast Rust/Golang/Javascript, but I will try these (and other sdks) to verify the gaps once I have the attachable working.
jedevc commentedon Mar 18, 2025
This feels like a duplicate of #8766, so going to close this one out.