Golang: get package from own gitlab private repository with SSH

WBOY
Release: 2024-07-18 20:52:40
Original
760 people have browsed it

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
Copy after login

step 4 : Run shell
Git configuration

git config --global url."YOUR_OWN_GITLAB_SITE:".insteadOf "https://YOUR_OWN_GITLAB_SITE/"
Copy after login

step 5 : Run shell

export GOPRIVATE=YOUR_OWN_GITLAB_SITE/YOUR_PACKAGE
Copy after login

step 6 : Run shell

go get YOUR_OWN_GITLAB_SITE/YOUR_PACKAGE
Copy after login

The above is the detailed content of Golang: get package from own gitlab private repository with SSH. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!