DEV Community

Alex Rios
Alex Rios

Posted on • Edited on

4 4

Using private Golang libs

1 - Configure GIT (~/.gitconfig)

[url "ssh://git@github.com/"]
    insteadOf = https://github.com/
Enter fullscreen mode Exit fullscreen mode

2 - Add the private repository location in GOPRIVATE env var

go env -w GOPRIVATE="github.com/<org>/<project>"
Enter fullscreen mode Exit fullscreen mode

2.1 - You can add a whole organization accepting all projects with *

go env -w GOPRIVATE="github.com/<org>/*"
Enter fullscreen mode Exit fullscreen mode

Top comments (2)

Collapse
 
gbrezende profile image
Guilherme Rezende • Edited

you can use '*' to work with all org projects

go env -w GOPRIVATE="github.com/<org>/*"

Collapse
 
alextrending profile image
Alex Rios

Indeed! Thanks Guilherme. I'm adding the note.

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay