美文网首页
gitlab私服问题

gitlab私服问题

作者: 72d89184c236 | 来源:发表于2020-03-24 11:29 被阅读0次

1,私服库密码问题
配置git保存密码
git config --global credential.helper store
2,使用goproxy代理服务器

package main

import (
    "net/http"
    "os"

    "github.com/goproxy/goproxy"
)

func main() {
    g := goproxy.New()
    g.GoBinEnv = append(
        os.Environ(),
        "GOPROXY=https://goproxy.cn,direct", // 使用 goproxy.cn 作为上游代理
        "GOPRIVATE=git.xxxx.com",   // 解决私有模块的拉取问题(比如可以配置成公司内部的代码源)
    )
    http.ListenAndServe("localhost:8080", g)
}

相关文章

网友评论

      本文标题:gitlab私服问题

      本文链接:https://www.haomeiwen.com/subject/glcoyhtx.html