Skip to content

Instantly share code, notes, and snippets.

@fedemengo
Created February 11, 2023 10:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fedemengo/afb2a05dec26656b4cc8a55eb7964226 to your computer and use it in GitHub Desktop.
Save fedemengo/afb2a05dec26656b4cc8a55eb7964226 to your computer and use it in GitHub Desktop.
Go mod with private repos

In case you need to download mods, use gopls with mods from a private repo you could use this setup. Ideally you want to have a proper ssh-config, this is how to get it done over https

Inside ~/.gitconfig

[url "https://{{your_user}}:{{access_token}}@github.com/{{repo_owner}}"]
    insteadOf = https://github.com/{{repo_owner}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment