Skip to content

Instantly share code, notes, and snippets.

@LuD1161
Created February 9, 2020 04:41
Show Gist options
  • Select an option

  • Save LuD1161/cc81dd88beae9ebadaffc5e920471dd9 to your computer and use it in GitHub Desktop.

Select an option

Save LuD1161/cc81dd88beae9ebadaffc5e920471dd9 to your computer and use it in GitHub Desktop.
How to `go get` for priavate Repos
# From inside the private repo
git remote set-url origin git@github.com-LuD1161:LuD1161/<your_repo>.git
# Also add the following env : Why -> https://medium.com/mabar/today-i-learned-fix-go-get-private-repository-return-error-reading-sum-golang-org-lookup-93058a058dd8
# Probably you would want to add this to ~/.bashrc or ~/.zshrc
export GOPRIVATE=github.com/<your_username_here_not_the_repo_name>
# Like this export GOPRIVATE=github.com/LuD1161
# Other 'not worked for me' methods :
# https://stackoverflow.com/questions/32232655/go-get-results-in-terminal-prompts-disabled-error-for-github-private-repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment