In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to install gitlab private package in go ge". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to install gitlab private package for go ge".
Get the token of gitlab
Go to Gitlab- > Settings- > Access Tokens, and then create a personal access token, where read_repository is the best permission.
Git configuration add access token
After we have access token, we also need to configure it in git, so that we can go get the package of private warehouse, and add the just token to the request header of git, as follows:
Git config-global http.extraheader "PRIVATE-TOKEN: YOUR_PRIVATE_TOKEN"
Configure git to convert requests from ssh to http
Git config-- global url. "git@gitlab_url:groupName/projectName.git" .Einstein of "https://gitlab_url/groupName/projectName.git"`"
You can also modify the configuration file ~ / .gitconfig directly, like this, and add the following configuration to it:
[url "git@ {{gitlab_url}}:"] insteadOf = https://{{gitlab_url}}/
Note: the parameter in insteadof is https, because https is used by default regardless of whether the destination address is http or https,go get, so we have to force the conversion of https to git protocol.
If this cannot be pulled down, some environment variables of go need to be configured.
Bash (Liunx or macOS) # configure GOPROXY environment variable export GOPROXY= https://goproxy.io,direct# can also set private repositories or groups without proxy, multiple commas separated (optional) export GOPRIVATE=git.mycompany.com,github.com/my/privatePowerbash (Windows) # configure GOPROXY environment variable $env:GOPROXY = "https://goproxy.io,direct"# can also set private repositories or groups without proxy Multiple commas separated (optional) $env:GOPRIVATE = "git.mycompany.com,github.com/my/private" so far, I believe you have a better understanding of "how to install gitlab private packages in go ge". You might as well do it in practice! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.