Skip to content

Instantly share code, notes, and snippets.

@r6m
Last active December 25, 2019 04:48
Show Gist options
  • Save r6m/8b064f64745c950d5b845f1848e69555 to your computer and use it in GitHub Desktop.
Save r6m/8b064f64745c950d5b845f1848e69555 to your computer and use it in GitHub Desktop.
go get private repository

using SSH key:

$ git config --global url."[email protected]:".insteadOf "https://github.com/"

using token

$ git config --global url."https://{USERNAME}:{GIT_TOKEN}@github.com".insteadOf "https://github.com/"

verify if it's in .gitconfig file in your home

$ cat ~/.gitconfig
[url "https://rezam90:[email protected]/"]
	insteadOf = https://github.com/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment