Created
February 9, 2020 04:41
-
-
Save LuD1161/cc81dd88beae9ebadaffc5e920471dd9 to your computer and use it in GitHub Desktop.
How to `go get` for priavate Repos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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