Golang: get package from own gitlab private repository with SSH

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
Enter fullscreen mode
Exit fullscreen mode

step 4 : Run shell
Git configuration

git config --global url."YOUR_OWN_GITLAB_SITE:".insteadOf "https://YOUR_OWN_GITLAB_SITE/"
Enter fullscreen mode
Exit fullscreen mode

step 5 : Run shell

export GOPRIVATE=YOUR_OWN_GITLAB_SITE/YOUR_PACKAGE
Enter fullscreen mode
Exit fullscreen mode

step 6 : Run shell

go get YOUR_OWN_GITLAB_SITE/YOUR_PACKAGE
Enter fullscreen mode
Exit fullscreen mode

Discover more from Coursity

Subscribe to get the latest posts sent to your email.

Leave a Comment

Your email address will not be published. Required fields are marked *

Discover more from Coursity

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top
Performance analysis of hostgator cloud hosting. Apptunix erp : empowering businesses with seamless integration and efficiency wordpress contractor. To turn on screen reader adjustments at any time, users need only to press the alt+1 keyboard combination.