Anyone knows why running this code in my Go module for private repo fails:
func (m *MyModule) Clone(ctx context.Context) *dagger.Directory {
return dag.Git("https://github.com/my-org/private-repo").Branch("main").Tree()
}
...when running this command:
dagger call clone terminal
Error output
✘ .clone: Directory! 3.3s ERROR
┇ git(url: "https://github.com/my-org/private-repo") › git remote metadata ›
✘ git ls-remote --symref https://github.com/my-org/private-repo 0.3s ERROR
remote: Invalid username or token. Password authentication is not supported for Git operations.
fatal: Authentication failed for 'https://github.com/my-org/private-repo/'
?
Everything works when using Dagger built-ins against the same repo/branch:
dagger core git --url https://github.com/my-org/private-repo branch --name main tree terminal
(Also when cloning the repo using same url normally.) Really weird.
Platform: MacOS Tahoe
SDK: Go
Dagger version: dagger v0.19.8 (image://registry.dagger.io/engine:v0.19.8) darwin/arm64/v8