Skip to content

Instantly share code, notes, and snippets.

@azureru
Last active April 26, 2022 09:22
Show Gist options
  • Save azureru/719b894c7ae615e1626529694d9a509f to your computer and use it in GitHub Desktop.
Save azureru/719b894c7ae615e1626529694d9a509f to your computer and use it in GitHub Desktop.
Go get to private self-hosted git repo with custom port.md

So one day I get unknown revision error after running go get command from private repo

The easiest solution is to just add alias to force to use ssh (so credential will use our underlying ~/.ssh)

[url "ssh://[email protected]:2222/"]
	insteadOf = https://theprivaterepo.com/

Some recomend to use .netrc or use git credential provider

@Hassan92Wa
Copy link

اريد هذا الملف جاهز

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