Remote Modules
Dagger can use remote repositories as Dagger modules. This feature is compatible with all major Git hosting platforms such as GitHub, GitLab, BitBucket, Azure DevOps, Codeberg, and Sourcehut. Dagger supports authentication via both HTTPS (using Git credential managers) and SSH (using a unified authentication approach).
Here is an example of using a Go builder Dagger module from a public repository over HTTPS:
dagger -m github.com/kpenfound/dagger-modules/golang@v0.2.0 call \
build --source=https://github.com/dagger/dagger --args=./cmd/dagger \
export --path=./build
Here is the same example using SSH authentication. Note that this requires SSH authentication to be properly configured on your Dagger host.
dagger -m git@github.com:kpenfound/dagger-modules/golang@v0.2.0 call \
build --source=https://github.com/dagger/dagger --args=./cmd/dagger \
export --path=./build
For more information, refer to the documentation on remote repository access.