"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > Golang: get package from own gitlab private repository with SSH

Golang: get package from own gitlab private repository with SSH

Published on 2024-07-29
Browse:844

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

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
Release Statement This article is reproduced at: https://dev.to/agiksetiawan/go-get-package-from-own-gitlab-private-repository-with-ssh-5el7?1 If there is any infringement, please contact [email protected] to delete it
Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3