#Dagger Private Repo Module on Github.com

1 messages · Page 1 of 1 (latest)

reef obsidian
#

I'm having issues getting my dagger modules from a private repo on Github.com in an organisation repo
If I try and install it
dagger install ssh://git@github.com/ORG-NAME/daggerverse.git/buildsoftware -vvv
I get the error
Error: failed to get configured module: no dagger.json found in directory . or any parents up to git root

If I try to run it
dagger -m ssh://git@github.com/ORG-NAME/daggerverse.git/buildsoftware call debug -vvv
I get the error
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: NotFound: rpc error: code = NotFound desc = socket default not found
My repo is laid out like the "diagram" below
daggerverse |--buildsoftware ----|--dagger.json ----|--dagger_build.cfg ----|--src ----|----|--main ----|----|----|--__init__.py ----|----|----|--main.py ----|----|----|--config_loader.py

My dagger.json looks like
{ "name": "buildsoftware", "sdk": "python" }

I can clone the daggerverse repo fine with SSH on Git.

Can anyone suggest what I'm doing wrong?

slate cove
#

@reef obsidian can you try calling dagger -m git@github.com/ORG-NAME/daggerverse.git/buildsoftware functions and check if that returns something?

reef obsidian
# slate cove <@151033560697012224> can you try calling `dagger -m git@github.com/ORG-NAME/dag...

For
dagger -m git@github.com/ORG-NAME/daggerverse.git/buildsoftware functions
I get
stderr: fatal: could not read Password for 'https://git@github.com': terminal prompts disabled
and if I try
dagger -m ssh://git@github.com/ORG-NAME/daggerverse.git/buildsoftware functions
I get
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: NotFound: rpc error: code = NotFound desc = socket default not found

reef obsidian
#

I've made a public repo with some code from another public daggerverse repo which should be structured and coded correctly.
I've found the https methods outlined here https://docs.dagger.io/api/remote-modules work fine but the SSH methods don't. I've tried this on a personal PC that's free from any corporate network restrictions as well. This is on WSL Ubuntu in Windows
HTTPS methods
github.com/username/repo/subdir
https://github.com/username/repo.git/subdir
SSL methods
git@github.com:username/repo.git/subdir
ssh://git@github.com/username/repo.git/subdir

Dagger supports the use of HTTP and SSH protocols for accessing remote repositories as Dagger modules, compatible with all major Git hosting platforms such as GitHub, GitLab, BitBucket, Azure DevOps, Codeberg, and Sourcehut. For SSH references ("refs"), Dagger employs a unified authentication approach.

reef obsidian
#

I've also tested on a personal native Ubuntu Linux machine. HTTPS is OK, SSH isn't

reef obsidian
#

I've got native Linux and WSL Linux working by setting the following
eval 'ssh-agent -s' Note: ' is actually `
then
ssh-add ~/.ssh/id_ed25519
This is then working

slate cove
#

so @reef obsidian just to make sure, were you able to achieve what you were trying to do?

reef obsidian
#

Thanks, I've achieved what I wanted to do now 🙂
I'd missed the importance of the SSH_AUTH_SOCK, so that's clearer to me now too. Thanks for the help