Docs/Git/get私库项目.md

17 lines
298 B
Markdown

go get只支持https,若只有http或ssh,需要配置
#### ssh
```bash
# ssh
# 在.gitconfig文件中替换
[url "ssh://git.xxx.com:2222"]
insteadOf https://git.xxx.com/
```
#### http
```bash
go env -w GOINSECURE=git.xxx.com
```
#### 配置私库
```bash
go env -w GOPRIVATE=git.xhupo.com
```