R
Railwayβ€’15mo ago
privv

Can't fetch go modules from private repo in the same orginization

I am trying to build a GO project and one of the modules I have is a private repo. I get
> [builder 4/4] RUN CGO_ENABLED=0 GOOS=linux go build -o /binary ./cmd:
5.122 Confirm the import path was entered correctly.
5.122 If this is a private repository, see https://golang.org/doc/faq#git_https for additional information.
5.122 internal/pkg/webservice/webservice.go:9:2: reading github.com/x/go-utils/go.mod at revision v0.1.0: git ls-remote -q origin in /go/pkg/mod/cache/vcs/01643059789a0e0b38ec86616e078457ed762e9610469ed02ba9c12b86a5e564: exit status 128:
5.122 fatal: could not read Username for 'https://github.com': terminal prompts disabled
> [builder 4/4] RUN CGO_ENABLED=0 GOOS=linux go build -o /binary ./cmd:
5.122 Confirm the import path was entered correctly.
5.122 If this is a private repository, see https://golang.org/doc/faq#git_https for additional information.
5.122 internal/pkg/webservice/webservice.go:9:2: reading github.com/x/go-utils/go.mod at revision v0.1.0: git ls-remote -q origin in /go/pkg/mod/cache/vcs/01643059789a0e0b38ec86616e078457ed762e9610469ed02ba9c12b86a5e564: exit status 128:
5.122 fatal: could not read Username for 'https://github.com': terminal prompts disabled
The Railway app is installed for all repos in my orginization. Any ideas?
13 Replies
Percy
Percyβ€’15mo ago
Project ID: ddfafcdb-e3f7-4533-bd92-dd87712f7620
privv
privvOPβ€’15mo ago
ddfafcdb-e3f7-4533-bd92-dd87712f7620
Brody
Brodyβ€’15mo ago
railway does not support authenticating to private repos for grabbing packages at this time
privv
privvOPβ€’15mo ago
ahhh got ya Is there any plans in the future to have this support?
Brody
Brodyβ€’15mo ago
yes it's definitely planned, no eta though
privv
privvOPβ€’15mo ago
Got ya, thanks πŸ˜„ Is there any workarounds that you might know of now? mby I need to build everything before I mount it into Docker somehow
Brody
Brodyβ€’15mo ago
doesn't authenticating with github require some ssh key or something?
privv
privvOPβ€’15mo ago
you can use a token and .NETRC
Brody
Brodyβ€’15mo ago
I assume you are building with your own dockerfile?
privv
privvOPβ€’15mo ago
Yeah I am πŸ˜„
Brody
Brodyβ€’15mo ago
well then you have full control over the entire build, I'm sure there's a way to sprinkle in github Auth to that
privv
privvOPβ€’14mo ago
Yea. I am probably able to fetch go vendor before the build somehow
Brody
Brodyβ€’14mo ago
sounds good, let me know how that goes!
Want results from more Discord servers?
Add your server