Skip to content

Instantly share code, notes, and snippets.

@zimdo
Forked from dmitshur/gist:6927554
Created August 16, 2016 16:36
Show Gist options
  • Save zimdo/f9fa5ab03cde2fa21393ef9fe71f3296 to your computer and use it in GitHub Desktop.
Save zimdo/f9fa5ab03cde2fa21393ef9fe71f3296 to your computer and use it in GitHub Desktop.
How to `go get` private repos using SSH key auth instead of password auth.
$ ssh -A vm
$ git config --global url."git@github.com:".insteadOf "https://github.com/"
$ cat ~/.gitconfig
[url "git@github.com:"]
	insteadOf = https://github.com/
$ go get github.com/private/repo && echo Success!
Success!

Sources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment