Step 1 : Generate SSH token RSA in local computer with ssh-keygen
Step 2 : Add ssh token to gitlab
step 3 : Run shell
RUN ssh-keyscan -t rsa gitlab.kplabs.id >> ~/.ssh/known_hosts
step 4 : Run shell
Git configuration
git config --global url."YOUR_OWN_GITLAB_SITE:".insteadOf "https://YOUR_OWN_GITLAB_SITE/"
step 5 : Run shell
export GOPRIVATE=YOUR_OWN_GITLAB_SITE/YOUR_PACKAGE
step 6 : Run shell
go get YOUR_OWN_GITLAB_SITE/YOUR_PACKAGE
Top comments (1)
I went through this once, and indeed is one of the things I truly hate about go. I also think the whole concept of embedding hard absolute repo url's for imports was a tragic mistake. It also makes it impossible to easily move your own imports around when you change git hosting. How well did that work out for Google once Microsoft bought github??