You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to use a private go library in dagger module? #9178
Originally posted by azat-dev December 12, 2024
Hello!
Given:
I am trying to daggerize my application, my dagger module uses a privat repository with go library.
The library installs fine on my host machine
When I execute:
dagger call handle-gitlab-event --source=.
Then I receive:
running post-command: go mod tidy
go: github.com/my_library_name: invalid version: git ls-remote -q origin in /go/pkg/m
/xxxxxxxxx: exit status 128:
fatal: could not read Username for 'https://github.com': terminal prompts disabled
Confirm the import path was entered correctly.
PS:
As I understand it executes dagger inside a docker container, so it doesn't have access to git credentials
I've read documentation about private modules https://docs.dagger.io/api/remote-modules/, but I think it will not help because I use a private "go library", I think if I will create a private dagger module the problem will persists because it still will not access to my private "go library"
We are also facing this issue. We are trying to adopt Dagger and part of our adoption would require us to be able to import private Go packages but my understanding is that Dagger doesn't currently support this (I believe I saw a similar issue before). Keen to hear if there are any workarounds in the meantime.
We are also facing this issue. We are trying to adopt Dagger and part of our adoption would require us to be able to import private Go packages but my understanding is that Dagger doesn't currently support this (I believe I saw a similar issue before). Keen to hear if there are any workarounds in the meantime.
Thanks.
Hello, you can look here the answer of one of mainteners
I believe this should be fixed with #9323. I would be eager to hear if that works well for your usecase (or not). Kindly let me know if I could be of help to verify this.
Activity
MikeyIO commentedon Dec 15, 2024
We are also facing this issue. We are trying to adopt Dagger and part of our adoption would require us to be able to import private Go packages but my understanding is that Dagger doesn't currently support this (I believe I saw a similar issue before). Keen to hear if there are any workarounds in the meantime.
Thanks.
azat-dev commentedon Dec 16, 2024
Hello, you can look here the answer of one of mainteners
#9174 (comment)
I personnally use git subtrees and replace directive for now
replace github.com/my_remote_repo v1.2.3 => ./my_local_path_to_subtree
rajatjindal commentedon Mar 18, 2025
I believe this should be fixed with #9323. I would be eager to hear if that works well for your usecase (or not). Kindly let me know if I could be of help to verify this.
jedevc commentedon Mar 18, 2025
Closing this, #9323 should be the fix for this - if it's not possible to configure after that, then it's a separate issue.