# go.mod **Repository Path**: taoshumin/go.mod ## Basic Information - **Project Name**: go.mod - **Description**: go mod 私有仓库操作步骤 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-07-31 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #### go mod 私有库 参考资料 `https://learnku.com/go/t/47596` - github ##### 具体操作 `go env -w GOPRIVATE=github.com/shumintao` `git config --global url."https://shumintao:68ec2f637c831c78a73caa0a4d215ba4fd31ef68@github.com".insteadOf "https://github.com"` - gitlab ##### 具体操作 `go env -w GOPRIVATE=gitlab.bj.sensetime.com/taoshumin_vendor` `git config --global http.extraheader "PRIVATE-TOKEN: SJJJJJJJJJJ"` `git config --global url."git@gitlab.bj.sensetime.com:".insteadOf "http://gitlab.bj.sensetime.com/"` ###### 证书CA校验 `go env -w GOINSECURE=gitlab.bj.sensetime.com/taoshumin_vendor` ==强烈建议使用 `go env -w GOINSECURE=gitlab.bj.sensetime.com/*`==== `如果Go版本是1.4.1以下的设置无效,只能go get -u -v -insecure gitlab.bj.sensetime.com/taoshumin_vendor/common ###### git ssh 认证 `cat ~./ssh/id_rsa.pub 添加到gitlab->设置->ssh` **注意事项** 制作dockerfile 文件时候,一定要把.ssh文件下id_rsa,id_rsa.pub,特别注意 known_host 也要添加进去。